From c837092aa28b4e537da351b2918db780f48e3c17 Mon Sep 17 00:00:00 2001 From: Adam Coffman Date: Wed, 23 Oct 2024 10:55:26 -0500 Subject: [PATCH] update cap config for new server --- server/config/deploy/production.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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