Add tps_v2 deploy function
This commit is contained in:
parent
7674eb23f0
commit
e6c28fc9b2
1 changed files with 12 additions and 2 deletions
|
@ -11,7 +11,7 @@ require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
|
||||||
# branch - Branch name to deploy. (needed by mina/git)
|
# branch - Branch name to deploy. (needed by mina/git)
|
||||||
|
|
||||||
ENV['to'] ||= "staging"
|
ENV['to'] ||= "staging"
|
||||||
ENV['to'] = "staging" unless ["staging", "production", "opensimplif"].include?(ENV['to'])
|
ENV['to'] = "staging" unless ["staging", "production", "opensimplif", "tps_v2"].include?(ENV['to'])
|
||||||
|
|
||||||
raise "missing domain, run with 'rake deploy domain=37.187.154.237'" if ENV['domain'].nil?
|
raise "missing domain, run with 'rake deploy domain=37.187.154.237'" if ENV['domain'].nil?
|
||||||
|
|
||||||
|
@ -51,13 +51,23 @@ elsif ENV["to"] == "opensimplif"
|
||||||
set :deploy_to, '/var/www/opensimplif'
|
set :deploy_to, '/var/www/opensimplif'
|
||||||
set :user, 'opensimplif' # Username in the server to SSH to.
|
set :user, 'opensimplif' # Username in the server to SSH to.
|
||||||
appname = 'opensimplif'
|
appname = 'opensimplif'
|
||||||
|
elsif ENV["to"] == "tps_v2"
|
||||||
|
if ENV['branch'].nil?
|
||||||
|
set :branch, 'tps_v2'
|
||||||
|
else
|
||||||
|
set :branch, ENV['branch']
|
||||||
|
end
|
||||||
|
set :deploy_to, '/var/www/tps_v2'
|
||||||
|
set :user, 'tps_v2' # Username in the server to SSH to.
|
||||||
|
appname = 'tps_v2'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
set :rails_env, ENV["to"]
|
set :rails_env, ENV["to"]
|
||||||
|
|
||||||
if ENV["to"] == "opensimplif"
|
if ENV["to"] == "opensimplif"
|
||||||
set :rails_env, "production"
|
set :rails_env, "production"
|
||||||
|
elsif ENV["to"] == "tps_v2"
|
||||||
|
set :rails_env, "production"
|
||||||
end
|
end
|
||||||
|
|
||||||
# For system-wide RVM install.
|
# For system-wide RVM install.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue