diff --git a/server/config/deploy/production.rb b/server/config/deploy/production.rb index cc7e70051..2635b0050 100644 --- a/server/config/deploy/production.rb +++ b/server/config/deploy/production.rb @@ -1,7 +1,7 @@ server "44.231.73.12", user: 'ubuntu', roles: %w{web db app} set :branch, 'release' -set :rbenv_ruby, '3.3.0' +set :rbenv_ruby, '3.3.5' set :rails_env, 'production' @@ -14,3 +14,16 @@ auth_methods: %w(publickey) } end + +# from https://github.com/capistrano/rails?tab=readme-ov-file#uploading-your-masterkey +namespace :deploy do + namespace :check do + before :linked_files, :set_master_key do + on roles(:app) do + unless test("[ -f #{shared_path}/config/credentials/production.key ]") + upload! 'config/credentials/production.key', "#{shared_path}/config/credentials/production.key" + end + end + end + end +end