ms_deploy 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ms_deploy/recipes/nginx.rb +17 -3
- data/lib/ms_deploy/templates/vhost.erb +10 -5
- data/lib/ms_deploy/version.rb +1 -1
- metadata +20 -20
@@ -1,4 +1,4 @@
|
|
1
|
-
require "ms_deploy/render"
|
1
|
+
require "ms_deploy/render"
|
2
2
|
|
3
3
|
Capistrano::Configuration.instance.load do
|
4
4
|
|
@@ -31,7 +31,21 @@ Capistrano::Configuration.instance.load do
|
|
31
31
|
task :install do
|
32
32
|
protocol = fetch(:protocol, nil).to_s
|
33
33
|
template_path = File.expand_path('../../templates/vhost.erb', __FILE__)
|
34
|
-
vars = {
|
34
|
+
vars = {
|
35
|
+
'application'=> application,
|
36
|
+
'project_root' => deploy_to + '/current',
|
37
|
+
'domain' => vhost_domain, 'stage' => stage,
|
38
|
+
'auth_basic_title' => fetch(:auth_basic_title, nil),
|
39
|
+
'auth_basic_password_file' => fetch(:auth_basic_password_file, nil),
|
40
|
+
'protocol' => 'http',
|
41
|
+
'nginx_cert_dir' => fetch(:nginx_cert_dir, '/etc/nginx/cert'),
|
42
|
+
'with_upstream_server' => true,
|
43
|
+
'with_file_expire_max' => fetch(:with_file_expire_max, true),
|
44
|
+
'optional_http_content' => fetch(:optional_nginx_server_http_content, ''),
|
45
|
+
'optional_https_content' => fetch(:optional_nginx_server_https_content, ''),
|
46
|
+
'cert_type' => fetch(:cert_type, 'pem'),
|
47
|
+
'key_type' => fetch(:cert_type, 'key')
|
48
|
+
}
|
35
49
|
|
36
50
|
if protocol.nil? or protocol == 'http' or protocol == 'both'
|
37
51
|
config_path = "#{shared_path}/config/#{application}_vhost.conf"
|
@@ -41,7 +55,7 @@ Capistrano::Configuration.instance.load do
|
|
41
55
|
sudo "ln -s #{config_path} /etc/nginx/sites-enabled/#{application}_#{stage}.conf"
|
42
56
|
end
|
43
57
|
if protocol == 'https' or protocol == 'both'
|
44
|
-
vars.merge!({'protocol' => 'https'
|
58
|
+
vars.merge!({'protocol' => 'https'})
|
45
59
|
|
46
60
|
config_path = "#{shared_path}/config/#{application}_ssl_vhost.conf"
|
47
61
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
<% if with_upstream_server %>
|
3
3
|
|
4
|
-
upstream <%= application %>_<%= stage %>_server {
|
4
|
+
upstream <%= application %>_<%= stage %>_<%= protocol %>_server {
|
5
5
|
# fail_timeout=0 means we always retry an upstream even if it failed
|
6
6
|
# to return a good HTTP response (in case the Unicorn master nukes a
|
7
7
|
# single worker for timing out).
|
@@ -22,10 +22,15 @@ server {
|
|
22
22
|
|
23
23
|
<% if protocol == 'https' %>
|
24
24
|
|
25
|
-
listen 443
|
25
|
+
listen 443 ssl;
|
26
26
|
|
27
|
-
ssl_certificate <%= nginx_cert_dir %>/<%= application %>_cert
|
28
|
-
ssl_certificate_key <%= nginx_cert_dir %>/<%= application %>_cert
|
27
|
+
ssl_certificate <%= nginx_cert_dir %>/<%= application %>_cert.<%= cert_type %>;
|
28
|
+
ssl_certificate_key <%= nginx_cert_dir %>/<%= application %>_cert.<%= key_type %>;
|
29
|
+
|
30
|
+
#ssl_ciphers SSLv3+HIGH:RC4+MEDIUM:!aNULL:!eNULL:!3DES:!MD5:@STRENGTH;
|
31
|
+
#ssl_prefer_server_ciphers on;
|
32
|
+
#ssl_protocols SSLv3;
|
33
|
+
#ssl_session_cache shared:SSL:10m;
|
29
34
|
|
30
35
|
keepalive_timeout 70;
|
31
36
|
|
@@ -101,7 +106,7 @@ server {
|
|
101
106
|
# proxy_buffering off;
|
102
107
|
|
103
108
|
if (!-f $request_filename) {
|
104
|
-
proxy_pass http://<%= application %>_<%= stage %>_server;
|
109
|
+
proxy_pass http://<%= application %>_<%= stage %>_<%= protocol %>_server;
|
105
110
|
break;
|
106
111
|
}
|
107
112
|
|
data/lib/ms_deploy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ms_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
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: 2012-06-
|
12
|
+
date: 2012-06-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gemcutter
|
16
|
-
requirement: &
|
16
|
+
requirement: &83494670 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *83494670
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: capistrano
|
27
|
-
requirement: &
|
27
|
+
requirement: &83494250 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 2.12.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *83494250
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: capistrano-ext
|
38
|
-
requirement: &
|
38
|
+
requirement: &83494000 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.2.1
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *83494000
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: capistrano_colors
|
49
|
-
requirement: &
|
49
|
+
requirement: &83493770 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.5.5
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *83493770
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: capistrano-unicorn
|
60
|
-
requirement: &
|
60
|
+
requirement: &83493520 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.1.6
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *83493520
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: capistrano-file_db
|
71
|
-
requirement: &
|
71
|
+
requirement: &83493230 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.1.0
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *83493230
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: capistrano-uptodate
|
82
|
-
requirement: &
|
82
|
+
requirement: &83492940 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 0.0.2
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *83492940
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rvm-capistrano
|
93
|
-
requirement: &
|
93
|
+
requirement: &83492820 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 1.2.2
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *83492820
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: erubis
|
104
|
-
requirement: &
|
104
|
+
requirement: &83492550 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *83492550
|
113
113
|
description: capistrano deployment task for my projects
|
114
114
|
email:
|
115
115
|
- michael.schiller@gmx.de
|