aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlban Peignier2018-02-01 11:00:52 +0100
committercedricnjanga2018-02-06 11:10:18 -0800
commit3f538cbd57d42b47f7c19e22d3a7bedc980a69ca (patch)
tree102f25a70f370c54eb54000c7aa0a23c2f9e863e
parentf78b950171da76c9306a4bf927ca8e83308ce262 (diff)
downloadchouette-core-3f538cbd57d42b47f7c19e22d3a7bedc980a69ca.tar.bz2
Change path in capistrano default_env to make bundle available for webpacker compiler. Refs #5803
-rw-r--r--config/deploy.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/config/deploy.rb b/config/deploy.rb
index d541f2581..1ea1613de 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -7,10 +7,12 @@ set :scm, :git
set :repository, "git@github.com:AF83/stif-boiv.git"
set :deploy_to, "/var/www/stif-boiv"
set :use_sudo, false
+set :ruby_version, "2.3.0"
default_run_options[:pty] = true
set :group_writable, true
-set :bundle_cmd, "/var/lib/gems/2.3.0/bin/bundle"
-set :rake, "#{bundle_cmd} exec rake"
+set :bundle_cmd, "/var/lib/gems/#{ruby_version}/bin/bundle"
+oset :rake, "#{bundle_cmd} exec rake"
+set :default_env, { path: "/var/lib/gems/#{ruby_version}/bin:$PATH" }
set :keep_releases, -> { fetch(:kept_releases, 5) }
after "deploy:restart", "deploy:cleanup"
@@ -29,7 +31,7 @@ require 'whenever/capistrano'
#after 'deploy:finalize_update', 'npm:install'
# Whenever
-set :whenever_variables, ->{ "'environment=#{fetch :whenever_environment}&bundle_command=bin/bundle exec&additionnal_path=/var/lib/gems/2.3.0/bin'" } # invoke bin/bundle to use 'correct' ruby environment
+set :whenever_variables, ->{ "'environment=#{fetch :whenever_environment}&bundle_command=bin/bundle exec&additionnal_path=/var/lib/gems/#{ruby_version}/bin'" } # invoke bin/bundle to use 'correct' ruby environment
set :whenever_command, "sudo /usr/local/sbin/whenever-sudo" # use sudo to change www-data crontab
set :whenever_user, "www-data" # use www-data crontab