DEV Community

loading...

How to deploy production environment rails 6

abigoroth profile image Ahmad Ya'kob Ubaidullah ・1 min read

at other server run :
EDITOR=vim rails credentials:edit

add and commit
config/secrets.yml.enc

then push and pull to production server.

copy master key and put into production server ENV using config/application.yml which will be loaded using figaro gem. The format is like this :

RAILS_MASTER_KEY: masterkeyhere

then start your server in production environment.

  • Note that not to commit application.yml , and better to add it to gitignore.

Discussion (0)

pic
Editor guide