Open arlindohall opened 1 year ago
Resources for the right way to do this... use master.key and environment variables on the deployment platform...
A comprehensive examination of Rails Secrets, Credentials, and Secret Key Base · GitHub
Containerizing a Ruby on Rails Application for Development with Docker Compose | DigitalOcean
Background
This project should run easily with the server setup logic in my dotfiles repo. Part of that is making the whole thing run on docker with as few files mapped as possible. I already (I think) set it up to pull the secret key base as an env variable, but I think if I pass in the master key instead it can encrypt the secret key base... or maybe it's the other way around?
I remember googling about it but I lost the links and forgot what the plan was. The below section is old and I don't remember what it means.
Ultimately the purpose of this is so that the thing runs in docker and can be wrapped with a script and still get the needed secret keys to be consistent between deployments to the same server.
Description
Remove the credentials file, pass in
secret_key_base
as an environment variable, and removemaster.key
if possible.While doing this, add the
docker-run.rb
script back and have the dot files repo that consumes it copy it to the current directory.