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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b3d10325309089e1561fb6aa15f37c78a1c22be4
4
- data.tar.gz: fb7893c640faf27ba81e6d5a71608a2b4aa7d87e
3
+ metadata.gz: eaf67212490361b2cae173771f98e60629a4623f
4
+ data.tar.gz: a2259e85f5490ab03db095948feffca50b2f2734
5
5
  SHA512:
6
- metadata.gz: 3ebda0948065e7f9f3330c14b56ce0f81ce87eb329150084d0b245e49623eba28193a1558f7646ac586419fefe2baf6b675e9900bffc15874ff321bbf82052cb
7
- data.tar.gz: bbc3f25c99eabc001f8cc5fe8ac50129f97fa94fab02a7cf2c2557458b668aaf8d6d9e372a7ce3e65a47b545fa305ee0db9c6eb2e187a4736b12c9a05d0ac16e
6
+ metadata.gz: d96ecf68212798dd3b26e4b8b372e96d68046db46e5ec1ac31c68438531eba4fa7a49de284e11ea2e26f8acfaee82abc131b67842597dd45626a5bb5eda9e9f7
7
+ data.tar.gz: db3f4e8e3d27cd8c6d5d1ebaa4d1c594f0f38a8e2cb29be6e422ba4418efe454ac5753db72f3a85b9a5c69b723073b25acf51c577909796ebd640c4360c65a09
@@ -1,5 +1,5 @@
1
1
  module Greenonline
2
2
  module CapistranoRecipes
3
- VERSION = "0.0.14"
3
+ VERSION = "0.0.15"
4
4
  end
5
5
  end
@@ -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 unicorn {
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://unicorn;
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greenonline_capistrano_recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pieter Visser