![]() Note that this is only necessary if you do not have the config/master. When using Docker to develop and run your apps, though, getting secrets:edit to work may requires a few tweaks to your Docker image.ĭepending on how the image is configured, you’ll need to ensure that an editor is installed in your container.įor one-off editing, we can do this using a simple command line: $ cd /path/to/your/app $ docker run -rm -it -mount type= bind,src= $,target=/app -e EDITOR=vi -e RAILS_MASTER_KEY=your-master-key my_app bin/rails credentials:edit (More on this below…) Editing Credentials in your Docker Container The key is provided either through config/master.key or supplying an RAILS_MASTER_KEY environment variable. Viewed 261 times 4 0 \\begingroup\ I'm currently building a text editor. Rails 5.1 introduced the encrypted file, with Rails 5.2 tidying things up by consolidating secrets and credentials into the file.Īlong with the changes came the secrets:edit task, allowing you to edit the credentials YAML file whilst automatically decrypting and encrypting the file using a master key. Ask Question Asked 7 years, 8 months ago. Rails on Docker: Using Rails Encrypted Credentials with Docker
0 Comments
Leave a Reply. |