greenonline_capistrano_recipes 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/greenonline/capistrano_recipes/version.rb +1 -1
- data/lib/greenonline/recipes/nginx.rb +1 -1
- data/lib/greenonline/recipes/templates/nginx_unicorn.erb +3 -3
- data/lib/greenonline/recipes/templates/unicorn.rb.erb +1 -1
- data/lib/greenonline/recipes/unicorn.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eaf67212490361b2cae173771f98e60629a4623f
|
4
|
+
data.tar.gz: a2259e85f5490ab03db095948feffca50b2f2734
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d96ecf68212798dd3b26e4b8b372e96d68046db46e5ec1ac31c68438531eba4fa7a49de284e11ea2e26f8acfaee82abc131b67842597dd45626a5bb5eda9e9f7
|
7
|
+
data.tar.gz: db3f4e8e3d27cd8c6d5d1ebaa4d1c594f0f38a8e2cb29be6e422ba4418efe454ac5753db72f3a85b9a5c69b723073b25acf51c577909796ebd640c4360c65a09
|
@@ -11,7 +11,7 @@ module Capistrano
|
|
11
11
|
|
12
12
|
desc "setup nginx for this application, adding it to sites-enabled"
|
13
13
|
task :setup, roles: :web do
|
14
|
-
surun "ln -nfs #{File.join(current_path, '/config/nginx.conf')} /etc/nginx/conf.d/#{application.downcase}.conf"
|
14
|
+
surun "ln -nfs #{File.join(current_path, '/config/nginx.conf')} /etc/nginx/conf.d/#{application.downcase}_#{stage}.conf"
|
15
15
|
end
|
16
16
|
after "deploy:setup", "nginx:setup"
|
17
17
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
upstream
|
1
|
+
upstream unicorn_<%= application.downcase %>_<%= stage %> {
|
2
2
|
# fail_timeout=0 means we always retry an upstream even if it failed
|
3
3
|
# to return a good HTTP response (in case the Unicorn master nukes a
|
4
4
|
# single worker for timing out).
|
5
5
|
|
6
6
|
# for UNIX domain socket setups:
|
7
|
-
server unix:/tmp/unicorn.<%= application.downcase %>.sock fail_timeout=0;
|
7
|
+
server unix:/tmp/unicorn.<%= application.downcase %>.<%= stage %>.sock fail_timeout=0;
|
8
8
|
}
|
9
9
|
|
10
10
|
server {
|
@@ -44,7 +44,7 @@ server {
|
|
44
44
|
# redirects, we set the Host: header above already.
|
45
45
|
proxy_redirect off;
|
46
46
|
|
47
|
-
proxy_pass http://
|
47
|
+
proxy_pass http://unicorn_<%= application.downcase %>_<%= stage %>;
|
48
48
|
}
|
49
49
|
|
50
50
|
error_page 500 502 503 504 /500.html;
|
@@ -5,7 +5,7 @@ pid "<%= unicorn_pid %>"
|
|
5
5
|
stderr_path "<%= unicorn_log %>"
|
6
6
|
stdout_path "<%= unicorn_log %>"
|
7
7
|
|
8
|
-
listen "/tmp/unicorn.<%= application.downcase %>.sock"
|
8
|
+
listen "/tmp/unicorn.<%= application.downcase %>.<%= stage %>.sock"
|
9
9
|
worker_processes <%= unicorn_workers %>
|
10
10
|
timeout 30
|
11
11
|
|
@@ -20,9 +20,9 @@ module Capistrano
|
|
20
20
|
task :setup, roles: :app do
|
21
21
|
template "unicorn_init.erb", "/tmp/unicorn_init"
|
22
22
|
run "chmod +x /tmp/unicorn_init"
|
23
|
-
surun "mv /tmp/unicorn_init /etc/init.d/unicorn_#{application.downcase}"
|
24
|
-
surun "chkconfig --add unicorn_#{application.downcase}"
|
25
|
-
surun "chkconfig unicorn_#{application.downcase} on"
|
23
|
+
surun "mv /tmp/unicorn_init /etc/init.d/unicorn_#{application.downcase}_#{stage}"
|
24
|
+
surun "chkconfig --add unicorn_#{application.downcase}_#{stage}"
|
25
|
+
surun "chkconfig unicorn_#{application.downcase}_#{stage} on"
|
26
26
|
end
|
27
27
|
after "deploy:setup", "unicorn:setup"
|
28
28
|
|
@@ -30,7 +30,7 @@ module Capistrano
|
|
30
30
|
%w(start stop restart upgrade).each do |command|
|
31
31
|
desc "#{command} unicorn"
|
32
32
|
task command, roles: :web do
|
33
|
-
run "service unicorn_#{application.downcase} #{command}"
|
33
|
+
run "service unicorn_#{application.downcase}_#{stage} #{command}"
|
34
34
|
end
|
35
35
|
end
|
36
36
|
after "deploy:restart", "unicorn:server:upgrade"
|