Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotenv #14

Open
nickautomatic opened this issue Mar 23, 2016 · 3 comments
Open

dotenv #14

nickautomatic opened this issue Mar 23, 2016 · 3 comments

Comments

@nickautomatic
Copy link
Contributor

Having config settings (eg. database credentials, site URL) in a .env file would not only potentially make multiple environment handling more elegant for Craft (see this), but could actually be shared by both Vagrant and Gulp (to, eg. avoid having craft.dev hard-coded as the server name anywhere)

@nickautomatic
Copy link
Contributor Author

nickautomatic commented Jun 15, 2016

This is now completed for Vagrant, Puppet, and Gulp (they're all sharing a common .env config file), but the .env file is not currently used by Craft itself. That will require a little more thought, since it would probably make Composer a dependency, and would be sensible to test on a new site first before rolling it into Crafty.

@peterlarkin
Copy link
Member

This seems like a good approach without requiring Composer. However, it would result in essentially 2 very similar config files.

@nickautomatic
Copy link
Contributor Author

nickautomatic commented Sep 4, 2017

Another possibility would be to include the full version of makeItCraft - the full version installs dotenv as well (it does make Composer a dependency, though, but it handles the initial setup). I only used the "install Craft" part of it because the dotenv bit added complexity that we weren't planning on using at the time, but it might be worth trying now there is a .env file.

At the time I asked Matt Stauffer (who wrote makeItCraft) for permission to include it, and he said that was fine, so I think it should be ok to add the rest of it if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants