Skip to content

Commit

Permalink
use a variable for the config folder path to use in the get_config task
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed May 23, 2023
1 parent 05f4b12 commit fdd665e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
set :bundle_without, 'development:test'
set :bundle_config, { deployment: true }
set :rails_env, "appliance"
set :config_folder_path, "#{fetch(:application)}/#{fetch(:stage)}"
# Defaults to [:web]
set :assets_roles, [:web, :app]
set :keep_assets, 3
Expand Down Expand Up @@ -82,7 +83,7 @@
TMP_CONFIG_PATH = "/tmp/#{SecureRandom.hex(15)}".freeze
on roles(:app) do
execute "git clone -q #{PRIVATE_CONFIG_REPO} #{TMP_CONFIG_PATH}"
execute "rsync -a #{TMP_CONFIG_PATH}/#{fetch(:application)}/ #{release_path}/"
execute "rsync -a #{TMP_CONFIG_PATH}/#{fetch(:config_folder_path)}/ #{release_path}/"
execute "rm -rf #{TMP_CONFIG_PATH}"
end
elsif defined?(LOCAL_CONFIG_PATH)
Expand Down

0 comments on commit fdd665e

Please sign in to comment.