capistrano-exts 1.11.3 → 1.12.0
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.
- data/.todo +9 -0
- data/README.md +3 -3
- data/TODO +3 -0
- data/examples/php_fpm/deploy/development.rb +16 -0
- data/examples/php_fpm/deploy/production.rb +16 -0
- data/examples/php_fpm/deploy/staging.rb +16 -0
- data/examples/rails_passenger/deploy/development.rb +16 -0
- data/examples/rails_passenger/deploy/production.rb +16 -0
- data/examples/rails_passenger/deploy/staging.rb +16 -0
- data/examples/rails_reverse_proxy/deploy/development.rb +16 -0
- data/examples/rails_reverse_proxy/deploy/production.rb +16 -0
- data/examples/rails_reverse_proxy/deploy/staging.rb +16 -0
- data/lib/capistrano-exts.rb +1 -1
- data/lib/capistrano-exts/receipts.rb +10 -1
- data/lib/capistrano-exts/receipts/contao.rb +1 -5
- data/lib/capistrano-exts/receipts/contents.rb +2 -6
- data/lib/capistrano-exts/receipts/deploy.rb +5 -9
- data/lib/capistrano-exts/receipts/files.rb +0 -4
- data/lib/capistrano-exts/receipts/functions.rb +1 -4
- data/lib/capistrano-exts/receipts/git.rb +0 -2
- data/lib/capistrano-exts/receipts/god.rb +0 -2
- data/lib/capistrano-exts/receipts/multistage.rb +0 -2
- data/lib/capistrano-exts/receipts/mysql.rb +5 -10
- data/lib/capistrano-exts/receipts/rails.rb +0 -4
- data/lib/capistrano-exts/receipts/servers.rb +1 -3
- data/lib/capistrano-exts/receipts/servers/web_server.rb +1 -1
- data/lib/capistrano-exts/receipts/unicorn.rb +28 -21
- data/lib/capistrano-exts/receipts/web.rb +136 -0
- data/lib/capistrano-exts/servers/web_server.rb +5 -5
- data/lib/capistrano-exts/templates/maintenance/index.rhtml +26 -0
- data/lib/capistrano-exts/templates/maintenance/stylesheets/styles.css +37 -0
- data/lib/capistrano-exts/templates/multistage.rb +16 -0
- data/lib/capistrano-exts/templates/web_servers/nginx.conf.erb +25 -11
- data/lib/capistrano-exts/version.rb +2 -2
- data/spec/{requests → acceptance}/nginx_spec.rb +28 -8
- data/spec/rendered_templates/nginx_passenger.conf +24 -10
- data/spec/rendered_templates/nginx_php_fpm.conf +25 -6
- data/spec/rendered_templates/nginx_reverse_proxy_address.conf +25 -6
- data/spec/rendered_templates/nginx_reverse_proxy_socket.conf +25 -6
- metadata +23 -20
@@ -4,25 +4,39 @@ server {
|
|
4
4
|
|
5
5
|
root /home/vhosts/technogate/public;
|
6
6
|
|
7
|
-
#
|
8
|
-
|
7
|
+
# Enable recursive error pages to catch 405 in a 503 error.
|
8
|
+
recursive_error_pages on;
|
9
|
+
|
10
|
+
# This allows people to use stylesheet, javascript and images in their
|
11
|
+
# maintenance html file
|
12
|
+
if ($request_filename ~* \.(css|js|jpg|gif|png)$) {
|
13
|
+
expires 30d;
|
9
14
|
break;
|
10
15
|
}
|
11
|
-
|
12
|
-
|
16
|
+
|
17
|
+
# If the maintenance page exists, throw a 503 error which we'd catch later.
|
18
|
+
if (-f $document_root/__system__/maintenance/index.html) {
|
13
19
|
return 503;
|
14
20
|
}
|
15
|
-
|
21
|
+
|
22
|
+
# Catch the 503 error and send it to the @503 location
|
23
|
+
error_page 503 @503;
|
24
|
+
|
25
|
+
# The @503 location
|
16
26
|
location @503 {
|
17
|
-
|
18
|
-
|
27
|
+
# Nginx will refuse POST requests to a static file and will throw a 405 error
|
28
|
+
# So we need to catch that and display again our maintenance page
|
29
|
+
error_page 405 = /__system__/maintenance/index.html;
|
19
30
|
|
20
|
-
|
31
|
+
# Rewrite all the requests to the maintenance page if it exists.
|
32
|
+
rewrite ^(.*)$ /__system__/maintenance/index.html break;
|
33
|
+
}
|
21
34
|
|
22
|
-
#
|
35
|
+
# Error Pages
|
23
36
|
error_page 404 /404.html;
|
24
37
|
error_page 500 502 504 /500.html;
|
25
|
-
|
38
|
+
|
39
|
+
passenger_enabled on;
|
26
40
|
|
27
41
|
|
28
42
|
# this serves static files that exist without running other rewrite tests
|
@@ -6,19 +6,38 @@ server {
|
|
6
6
|
|
7
7
|
index index.php index.html;
|
8
8
|
|
9
|
-
#
|
10
|
-
|
9
|
+
# Enable recursive error pages to catch 405 in a 503 error.
|
10
|
+
recursive_error_pages on;
|
11
|
+
|
12
|
+
# This allows people to use stylesheet, javascript and images in their
|
13
|
+
# maintenance html file
|
14
|
+
if ($request_filename ~* \.(css|js|jpg|gif|png)$) {
|
15
|
+
expires 30d;
|
11
16
|
break;
|
12
17
|
}
|
13
|
-
|
14
|
-
|
18
|
+
|
19
|
+
# If the maintenance page exists, throw a 503 error which we'd catch later.
|
20
|
+
if (-f $document_root/__system__/maintenance/index.html) {
|
15
21
|
return 503;
|
16
22
|
}
|
17
|
-
|
23
|
+
|
24
|
+
# Catch the 503 error and send it to the @503 location
|
25
|
+
error_page 503 @503;
|
26
|
+
|
27
|
+
# The @503 location
|
18
28
|
location @503 {
|
19
|
-
|
29
|
+
# Nginx will refuse POST requests to a static file and will throw a 405 error
|
30
|
+
# So we need to catch that and display again our maintenance page
|
31
|
+
error_page 405 = /__system__/maintenance/index.html;
|
32
|
+
|
33
|
+
# Rewrite all the requests to the maintenance page if it exists.
|
34
|
+
rewrite ^(.*)$ /__system__/maintenance/index.html break;
|
20
35
|
}
|
21
36
|
|
37
|
+
# Error Pages
|
38
|
+
error_page 404 /404.html;
|
39
|
+
error_page 500 502 504 /500.html;
|
40
|
+
|
22
41
|
location / {
|
23
42
|
|
24
43
|
# this serves static files that exist without running other rewrite tests
|
@@ -2,19 +2,38 @@ server {
|
|
2
2
|
listen 80;
|
3
3
|
server_name technogate.fr www.technogate.fr;
|
4
4
|
|
5
|
-
#
|
6
|
-
|
5
|
+
# Enable recursive error pages to catch 405 in a 503 error.
|
6
|
+
recursive_error_pages on;
|
7
|
+
|
8
|
+
# This allows people to use stylesheet, javascript and images in their
|
9
|
+
# maintenance html file
|
10
|
+
if ($request_filename ~* \.(css|js|jpg|gif|png)$) {
|
11
|
+
expires 30d;
|
7
12
|
break;
|
8
13
|
}
|
9
|
-
|
10
|
-
|
14
|
+
|
15
|
+
# If the maintenance page exists, throw a 503 error which we'd catch later.
|
16
|
+
if (-f $document_root/__system__/maintenance/index.html) {
|
11
17
|
return 503;
|
12
18
|
}
|
13
|
-
|
19
|
+
|
20
|
+
# Catch the 503 error and send it to the @503 location
|
21
|
+
error_page 503 @503;
|
22
|
+
|
23
|
+
# The @503 location
|
14
24
|
location @503 {
|
15
|
-
|
25
|
+
# Nginx will refuse POST requests to a static file and will throw a 405 error
|
26
|
+
# So we need to catch that and display again our maintenance page
|
27
|
+
error_page 405 = /__system__/maintenance/index.html;
|
28
|
+
|
29
|
+
# Rewrite all the requests to the maintenance page if it exists.
|
30
|
+
rewrite ^(.*)$ /__system__/maintenance/index.html break;
|
16
31
|
}
|
17
32
|
|
33
|
+
# Error Pages
|
34
|
+
error_page 404 /404.html;
|
35
|
+
error_page 500 502 504 /500.html;
|
36
|
+
|
18
37
|
location / {
|
19
38
|
|
20
39
|
# this serves static files that exist without running other rewrite tests
|
@@ -2,19 +2,38 @@ server {
|
|
2
2
|
listen 80;
|
3
3
|
server_name technogate.fr www.technogate.fr;
|
4
4
|
|
5
|
-
#
|
6
|
-
|
5
|
+
# Enable recursive error pages to catch 405 in a 503 error.
|
6
|
+
recursive_error_pages on;
|
7
|
+
|
8
|
+
# This allows people to use stylesheet, javascript and images in their
|
9
|
+
# maintenance html file
|
10
|
+
if ($request_filename ~* \.(css|js|jpg|gif|png)$) {
|
11
|
+
expires 30d;
|
7
12
|
break;
|
8
13
|
}
|
9
|
-
|
10
|
-
|
14
|
+
|
15
|
+
# If the maintenance page exists, throw a 503 error which we'd catch later.
|
16
|
+
if (-f $document_root/__system__/maintenance/index.html) {
|
11
17
|
return 503;
|
12
18
|
}
|
13
|
-
|
19
|
+
|
20
|
+
# Catch the 503 error and send it to the @503 location
|
21
|
+
error_page 503 @503;
|
22
|
+
|
23
|
+
# The @503 location
|
14
24
|
location @503 {
|
15
|
-
|
25
|
+
# Nginx will refuse POST requests to a static file and will throw a 405 error
|
26
|
+
# So we need to catch that and display again our maintenance page
|
27
|
+
error_page 405 = /__system__/maintenance/index.html;
|
28
|
+
|
29
|
+
# Rewrite all the requests to the maintenance page if it exists.
|
30
|
+
rewrite ^(.*)$ /__system__/maintenance/index.html break;
|
16
31
|
}
|
17
32
|
|
33
|
+
# Error Pages
|
34
|
+
error_page 404 /404.html;
|
35
|
+
error_page 500 502 504 /500.html;
|
36
|
+
|
18
37
|
location / {
|
19
38
|
|
20
39
|
# this serves static files that exist without running other rewrite tests
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-exts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-09-
|
12
|
+
date: 2011-09-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
16
|
-
requirement: &
|
16
|
+
requirement: &2154210240 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.8.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2154210240
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: capistrano_colors
|
27
|
-
requirement: &
|
27
|
+
requirement: &2154209480 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.5.5
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2154209480
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: i18n
|
38
|
-
requirement: &
|
38
|
+
requirement: &2154208620 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.6.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2154208620
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: activesupport
|
49
|
-
requirement: &
|
49
|
+
requirement: &2154208160 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 3.1.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2154208160
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: guard
|
60
|
-
requirement: &
|
60
|
+
requirement: &2154207660 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.6.2
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2154207660
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: guard-bundler
|
71
|
-
requirement: &
|
71
|
+
requirement: &2154207000 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.1.3
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2154207000
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: guard-rspec
|
82
|
-
requirement: &
|
82
|
+
requirement: &2154206440 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 0.4.3
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2154206440
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rspec
|
93
|
-
requirement: &
|
93
|
+
requirement: &2154205800 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: 2.6.0
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2154205800
|
102
102
|
description: ! 'Capistrano exts is a set of helper tasks to help with the initial
|
103
103
|
server
|
104
104
|
|
@@ -162,18 +162,21 @@ files:
|
|
162
162
|
- lib/capistrano-exts/receipts/servers/web_server/apache.rb
|
163
163
|
- lib/capistrano-exts/receipts/servers/web_server/nginx.rb
|
164
164
|
- lib/capistrano-exts/receipts/unicorn.rb
|
165
|
+
- lib/capistrano-exts/receipts/web.rb
|
165
166
|
- lib/capistrano-exts/servers/utils/erb.rb
|
166
167
|
- lib/capistrano-exts/servers/utils/variables.rb
|
167
168
|
- lib/capistrano-exts/servers/web_server.rb
|
168
169
|
- lib/capistrano-exts/servers/web_server/nginx.rb
|
170
|
+
- lib/capistrano-exts/templates/maintenance/index.rhtml
|
171
|
+
- lib/capistrano-exts/templates/maintenance/stylesheets/styles.css
|
169
172
|
- lib/capistrano-exts/templates/multistage.rb
|
170
173
|
- lib/capistrano-exts/templates/web_servers/nginx.conf.erb
|
171
174
|
- lib/capistrano-exts/version.rb
|
175
|
+
- spec/acceptance/nginx_spec.rb
|
172
176
|
- spec/rendered_templates/nginx_passenger.conf
|
173
177
|
- spec/rendered_templates/nginx_php_fpm.conf
|
174
178
|
- spec/rendered_templates/nginx_reverse_proxy_address.conf
|
175
179
|
- spec/rendered_templates/nginx_reverse_proxy_socket.conf
|
176
|
-
- spec/requests/nginx_spec.rb
|
177
180
|
- spec/servers/web_server/nginx_spec.rb
|
178
181
|
- spec/spec_helper.rb
|
179
182
|
homepage: https://github.com/TechnoGate/capistrano-exts
|
@@ -202,10 +205,10 @@ specification_version: 3
|
|
202
205
|
summary: Set of helper tasks to help with the initial server configuration and application
|
203
206
|
provisioning.
|
204
207
|
test_files:
|
208
|
+
- spec/acceptance/nginx_spec.rb
|
205
209
|
- spec/rendered_templates/nginx_passenger.conf
|
206
210
|
- spec/rendered_templates/nginx_php_fpm.conf
|
207
211
|
- spec/rendered_templates/nginx_reverse_proxy_address.conf
|
208
212
|
- spec/rendered_templates/nginx_reverse_proxy_socket.conf
|
209
|
-
- spec/requests/nginx_spec.rb
|
210
213
|
- spec/servers/web_server/nginx_spec.rb
|
211
214
|
- spec/spec_helper.rb
|