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

figaro for app configuration #10

Open
tony-rp opened this issue Mar 7, 2018 · 7 comments
Open

figaro for app configuration #10

tony-rp opened this issue Mar 7, 2018 · 7 comments

Comments

@tony-rp
Copy link

tony-rp commented Mar 7, 2018

https://github.com/laserlemon/figaro

@coderhs coderhs added this to the Initial stable release milestone Mar 7, 2018
@coderhs
Copy link
Member

coderhs commented Mar 8, 2018

Figaro added 747281d

@coderhs coderhs closed this as completed Mar 8, 2018
@redtachyons
Copy link
Contributor

No updates in Figaro gem for last one year. I think it is better to go with dotenv. An advantage of dotenv is we can commit development/test credentials in the repo and gitignore production credentials

@coderhs
Copy link
Member

coderhs commented Mar 9, 2018

@redtachyons can you elaborate on the .gitignore production credentials part, with an example? I am not familiar with that.

I will reopen this issue.

@coderhs coderhs reopened this Mar 9, 2018
@coderhs
Copy link
Member

coderhs commented Mar 9, 2018

When I install foreman it adds dotenv as well so once you give the example here we can move to dotenv.

@redtachyons
Copy link
Contributor

Quoted from https://github.com/bkeepers/dotenv

Can I use dotenv in production?

dotenv was originally created to load configuration variables into ENV in development. There are typically better ways to manage configuration in production environments - such as /etc/environment managed by Puppet or Chef, heroku config, etc.

However, some find dotenv to be a convenient way to configure Rails applications in staging and production environments, and you can do that by defining environment-specific files like .env.production or .env.test.

If you use this gem to handle env vars for multiple Rails environments (development, test, production, etc.), please note that env vars that are general to all environments should be stored in .env. Then, environment specific env vars should be stored in .env.<that environment's name>.

@redtachyons
Copy link
Contributor

Ie we can keep .env.development safely in repo and gitignore .env.production

@coderhs
Copy link
Member

coderhs commented Mar 12, 2018

@redtachyons Thanks for that information, definitely make sense to change to dotenv. My reason for choosing Figaro was to split it up based on environments. But seeing writing something as .env.test and .env.development will isolate the credentials based on the environment then I would definitely prefer that as multiple files are better than multiple sections in a single file.

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

No branches or pull requests

3 participants