You can set environment variables with figaro
gem.
How to Store Environment Variables in Engine Yard
-
16-06-2023 - |
Pergunta
For Ruby on Rails applications, I've noticed that I don't have the option to do a ENV['NUCLEAR_LAUNCH_CODES'] = 12345
anywhere unlike Heroku.
For a Rails 3.2.17 application, does anyone know what the best practice is?
Solução
Outras dicas
You can use this recipe from Engine Yard.
If you have some sensitive data in your environment vars, the custom recipe allow you to manage your vars outside your application repos.
Your application can use environment vars configured in the recipe after you apply the recipe.
But if you use rails console
via ssh, you have to explicitly read and execute the config file before you enter a console.
source /data/YOUR_APP_NAME/shared/config/env.custom
bundle exec rails console
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow