atech_cloud 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/atech_cloud/deploy.rb +6 -3
- metadata +2 -2
data/lib/atech_cloud/deploy.rb
CHANGED
@@ -126,21 +126,24 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
126
126
|
namespace :unicorn do
|
127
127
|
task :start, :roles => :app do
|
128
128
|
upload_config
|
129
|
+
sudo = fetch(:unicorn_sudo, true) ? 'sudo -u app' : ''
|
129
130
|
for environment in environments
|
130
|
-
run "sudo
|
131
|
+
run "#{sudo} sh -c \"umask 002 && cd #{deploy_to} && bundle exec unicorn_rails -E #{environment} -c #{deploy_to}/config/unicorn.rb -D\""
|
131
132
|
end
|
132
133
|
end
|
133
134
|
|
134
135
|
task :stop, :roles => :app do
|
136
|
+
sudo = fetch(:unicorn_sudo, true) ? 'sudo -u app' : ''
|
135
137
|
for environment in environments
|
136
|
-
run "sudo
|
138
|
+
run "#{sudo} sh -c \"kill `cat #{deploy_to}/tmp/pids/unicorn.#{environment}.pid`\""
|
137
139
|
end
|
138
140
|
end
|
139
141
|
|
140
142
|
task :restart, :roles => :app do
|
141
143
|
upload_config
|
144
|
+
sudo = fetch(:unicorn_sudo, true) ? 'sudo -u app' : ''
|
142
145
|
for environment in environments
|
143
|
-
run "sudo
|
146
|
+
run "#{sudo} sh -c \"kill -USR2 `cat #{deploy_to}/tmp/pids/unicorn.#{environment}.pid`\""
|
144
147
|
end
|
145
148
|
end
|
146
149
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atech_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-04 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email: adam@atechmedia.com
|