Sha256: 17fd390991848c88717877f2085b19722b8cfce963ff855f6e3c03ea0a28ae7c

Contents?: true

Size: 844 Bytes

Versions: 6

Compression:

Stored size: 844 Bytes

Contents

task :set_railman_env do
  set :deploy_to, "/home/deploy/apps/#{fetch(:application)}"
  set :environment, { rails_env: 'production'}
  set :chruby_prefix, "/usr/local/bin/chruby-exec #{fetch(:chruby_ruby)} -- RAILS_ENV=production "

  SSHKit.config.command_map[:rake] = "#{fetch(:chruby_prefix)} DISABLE_DATABASE_ENVIRONMENT_CHECK=1 #{fetch(:deploy_to)}/bin/rake"
  SSHKit.config.command_map[:bundle] = "#{fetch(:chruby_prefix)} #{fetch(:deploy_to)}/bin/bundle"
  %w(systemctl certbot).each do |cmd|
    SSHKit.config.command_map[cmd.to_sym] = "sudo #{cmd}"
  end
  SSHKit.config.command_map[:su_rm] = 'sudo rm'
  SSHKit.config.command_map[:su_ln] = 'sudo ln'
  SSHKit.config.command_map[:su_cp] = 'sudo cp'
end

before :setup, :set_railman_env
before :deploy, :set_railman_env
before :update, :set_railman_env
before :remove, :set_railman_env

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
railman-deployment-2.0.10 lib/railman/tasks/set_railman_env.rake
railman-deployment-2.0.9 lib/railman/tasks/set_railman_env.rake
railman-deployment-2.0.8 lib/railman/tasks/set_railman_env.rake
railman-deployment-2.0.7 lib/railman/tasks/set_railman_env.rake
railman-deployment-2.0.6 lib/railman/tasks/set_railman_env.rake
railman-deployment-2.0.5 lib/railman/tasks/set_railman_env.rake