I'm running a jelastic setup to host several Rails applications.
In Rails, it is common to store configuration in the environment. Especially secret data, such as passwords or access keys.
Where should I place these on a Ruby/Rails jelastic setup?
I currently have nginx with Passenger; because that was the default. If Puma or Unicorn makes this easier or more robust, I'd love to hear that.
I currently have my environment variables declared in the /etc/nginx/nginx.conf
using nginx env directive. But this means I am storing the secrects in the nginx.conf file. Yuck.
## ENV VARS
env SECRET_KEY_BASE=xxxxxxxxxxxx;
env BLAZER_USERNAME=uuuuu;
env BLAZER_PASSWORD=xxxxxxxxxxxx;
env AWS_ID=aaa;
env AWS_SECRET_KEY=aaa;
env BLAZER_DATABASE_URL=postgres://uuu:ppp@example.com:5432/production;
- How do you manage your secrets on any jelastic setup?
- How do you manage your secrets on a Rails jelastic setup?
- Where do you store environment variables to be picked up by the running app?
Edit: I am not interested in keeping secrets away from "other users/processes on the machine". I don't want to store my secrets in my application git-repo. Which is really, really bad practice. As such, I want my Rails app to read e.g. ENV['AWS_SECRET_KEY']
instead of storing that secret key somewhere in my codebase.