capistrano3-nginx 2.1.5 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +34 -0
- data/README.md +30 -26
- data/capistrano3-nginx.gemspec +6 -6
- data/lib/capistrano/nginx/version.rb +3 -0
- data/lib/capistrano/nginx.rb +56 -1
- data/lib/capistrano/tasks/nginx.rake +26 -57
- data/templates/nginx.conf.erb +11 -2
- metadata +14 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3804ce5785ee1dddb14d9cf3ddda85b74074bf45
|
4
|
+
data.tar.gz: cd007e618b312e377fa5e30bf4d1560ef8ae1ea8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e79ec054bf79f0571a92472266faa742e7c7938a76f4a4ba1a29c1ca1611bee2a80a94bb698d4920a80642cb3d78e2a635a851cd70e480bd94f2542d290d8385
|
7
|
+
data.tar.gz: 654e4eab16f2486e071dc882495bfc5b87c5b7526c45ef9dfc09a903203e3ef01afc3e18c9c731510aec88dceb8bade37ea93fb120e57e59175740f6fafae4ab
|
data/.gitignore
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
capistrano3-nginx (2.2)
|
5
|
+
capistrano (>= 3.0.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
airbrussh (1.1.2)
|
11
|
+
sshkit (>= 1.6.1, != 1.7.0)
|
12
|
+
capistrano (3.8.0)
|
13
|
+
airbrussh (>= 1.0.0)
|
14
|
+
i18n
|
15
|
+
rake (>= 10.0.0)
|
16
|
+
sshkit (>= 1.9.0)
|
17
|
+
i18n (0.8.6)
|
18
|
+
net-scp (1.2.1)
|
19
|
+
net-ssh (>= 2.6.5)
|
20
|
+
net-ssh (4.1.0)
|
21
|
+
rake (12.3.0)
|
22
|
+
sshkit (1.12.0)
|
23
|
+
net-scp (>= 1.1.2)
|
24
|
+
net-ssh (>= 2.8.0)
|
25
|
+
|
26
|
+
PLATFORMS
|
27
|
+
ruby
|
28
|
+
|
29
|
+
DEPENDENCIES
|
30
|
+
capistrano3-nginx!
|
31
|
+
rake
|
32
|
+
|
33
|
+
BUNDLED WITH
|
34
|
+
1.16.1
|
data/README.md
CHANGED
@@ -1,13 +1,12 @@
|
|
1
|
-
# Capistrano::Nginx [![Gem Version](https://badge.fury.io/rb/capistrano3-nginx.svg)](http://badge.fury.io/rb/capistrano3-nginx)
|
2
1
|
|
3
|
-
Nginx support for Capistrano 3.x
|
2
|
+
Nginx support for Capistrano 3.x, with sudo password prompt
|
4
3
|
|
5
4
|
## Installation
|
6
5
|
|
7
6
|
Add this line to your application's Gemfile:
|
8
7
|
|
9
|
-
gem 'capistrano3-nginx', '~>
|
10
|
-
|
8
|
+
gem 'capistrano3-nginx', '~> 3.0.4'
|
9
|
+
|
11
10
|
|
12
11
|
And then execute:
|
13
12
|
|
@@ -23,10 +22,29 @@ Require in `Capfile` to use the default task:
|
|
23
22
|
|
24
23
|
```ruby
|
25
24
|
require 'capistrano/nginx'
|
25
|
+
install_plugin Capistrano::Nginx
|
26
|
+
```
|
27
|
+
|
28
|
+
Make sure pty is enabled in deploy.rb
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
set :pty, true
|
26
32
|
```
|
27
33
|
|
34
|
+
Make sure server has sudo role
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
server 'example.com',
|
38
|
+
user: 'with_sudo_access',
|
39
|
+
roles: %w{sudo}
|
40
|
+
```
|
41
|
+
|
28
42
|
You will get the following tasks
|
29
43
|
|
44
|
+
```sh
|
45
|
+
cap -T | grep "cap nginx"
|
46
|
+
```
|
47
|
+
|
30
48
|
```ruby
|
31
49
|
cap nginx:start # Start nginx service
|
32
50
|
cap nginx:stop # Stop nginx service
|
@@ -37,8 +55,12 @@ cap nginx:site:disable # Disables the site removing the symbolic lin
|
|
37
55
|
cap nginx:site:enable # Enables the site creating a symbolic link into the enabled folder
|
38
56
|
cap nginx:site:remove # Removes the site removing the configuration file from the available folder
|
39
57
|
cap nginx:gzip_static # Compress all js and css files in :nginx_static_dir with gzip
|
58
|
+
cap nginx:configtest # Configtest nginx service
|
40
59
|
```
|
41
60
|
|
61
|
+
|
62
|
+
|
63
|
+
|
42
64
|
Configurable options (copy into deploy.rb), shown here with examples:
|
43
65
|
|
44
66
|
```ruby
|
@@ -68,12 +90,13 @@ set :nginx_redirected_domains, "bar.com other.com"
|
|
68
90
|
set :nginx_service_path, "/etc/init.d/nginx"
|
69
91
|
|
70
92
|
# Roles the deploy nginx site on,
|
71
|
-
# default value: :
|
72
|
-
set :nginx_roles, :
|
93
|
+
# default value: :sudo
|
94
|
+
set :nginx_roles, :sudo
|
73
95
|
|
74
96
|
# Path, where nginx log file will be stored
|
97
|
+
# set it nil if don't want to override log path
|
75
98
|
# default value: "#{shared_path}/log"
|
76
|
-
|
99
|
+
set :nginx_log_path, nil
|
77
100
|
|
78
101
|
# Path where to look for static files
|
79
102
|
# default value: "public"
|
@@ -142,22 +165,3 @@ set :app_server_port, 8080
|
|
142
165
|
## Thanks
|
143
166
|
Thansk for the inspiration on several nginx recipes out there
|
144
167
|
|
145
|
-
## Contributing
|
146
|
-
|
147
|
-
1. Fork it
|
148
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
149
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
150
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
151
|
-
5. Create new Pull Request
|
152
|
-
|
153
|
-
## Credits
|
154
|
-
|
155
|
-
Thank you [contributors](https://github.com/platanus/guides/graphs/contributors)!
|
156
|
-
|
157
|
-
<img src="http://platan.us/gravatar_with_text.png" alt="Platanus" width="250"/>
|
158
|
-
|
159
|
-
capistrano3-nginx is maintained by [platanus](http://platan.us).
|
160
|
-
|
161
|
-
## License
|
162
|
-
|
163
|
-
Guides is © 2014 platanus, spa. It is free software and may be redistributed under the terms specified in the LICENSE file.
|
data/capistrano3-nginx.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'capistrano/nginx/version'
|
4
5
|
|
5
6
|
Gem::Specification.new do |spec|
|
6
7
|
spec.name = 'capistrano3-nginx'
|
7
|
-
spec.version =
|
8
|
-
spec.authors = ['Juan Ignacio Donoso']
|
9
|
-
spec.email = ['jidonoso@gmail.com']
|
8
|
+
spec.version = Capistrano::NGINX_VERSION
|
9
|
+
spec.authors = ['Juan Ignacio Donoso', 'treenewbee']
|
10
10
|
spec.description = %q{Adds suuport to nginx for Capistrano 3.x}
|
11
11
|
spec.summary = %q{Adds suuport to nginx for Capistrano 3.x}
|
12
|
-
spec.homepage = 'https://github.com/
|
12
|
+
spec.homepage = 'https://github.com/treenewbee/capistrano3-nginx'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
|
15
15
|
spec.files = `git ls-files`.split($/)
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.add_dependency 'capistrano', '
|
20
|
+
spec.add_dependency 'capistrano', '~> 3.0'
|
21
21
|
|
22
|
-
spec.add_development_dependency 'rake'
|
22
|
+
spec.add_development_dependency 'rake', '~> 0'
|
23
23
|
end
|
data/lib/capistrano/nginx.rb
CHANGED
@@ -1 +1,56 @@
|
|
1
|
-
|
1
|
+
require "capistrano/plugin"
|
2
|
+
module Capistrano
|
3
|
+
class Nginx < Capistrano::Plugin
|
4
|
+
|
5
|
+
def set_defaults
|
6
|
+
set :nginx_sudo_paths, -> { [:nginx_log_path, :nginx_sites_enabled_dir, :nginx_sites_available_dir] }
|
7
|
+
set :nginx_sudo_tasks, -> { ['nginx:start', 'nginx:stop', 'nginx:restart', 'nginx:reload', 'nginx:configtest', 'nginx:site:add', 'nginx:site:disable', 'nginx:site:enable', 'nginx:site:remove' ] }
|
8
|
+
set :nginx_log_path, -> { "#{shared_path}/log" }
|
9
|
+
set :nginx_service_path, -> { 'service nginx' }
|
10
|
+
set :nginx_static_dir, -> { "public" }
|
11
|
+
set :nginx_application_name, -> { fetch(:application) }
|
12
|
+
set :nginx_sites_enabled_dir, -> { "/etc/nginx/sites-enabled" }
|
13
|
+
set :nginx_sites_available_dir, -> { "/etc/nginx/sites-available" }
|
14
|
+
set :nginx_roles, -> { :sudo }
|
15
|
+
set :nginx_template, -> { :default }
|
16
|
+
set :nginx_use_ssl, -> { false }
|
17
|
+
set :nginx_ssl_certificate, -> { "#{fetch(:application)}.crt" }
|
18
|
+
set :nginx_ssl_certificate_path, -> { '/etc/ssl/certs' }
|
19
|
+
set :nginx_ssl_certificate_key, -> { "#{fetch(:application)}.key" }
|
20
|
+
set :nginx_ssl_certificate_key_path, -> { '/etc/ssl/private' }
|
21
|
+
set :app_server, -> { true }
|
22
|
+
end
|
23
|
+
|
24
|
+
def define_tasks
|
25
|
+
eval_rakefile File.expand_path('../tasks/nginx.rake', __FILE__)
|
26
|
+
end
|
27
|
+
|
28
|
+
# prepend :sudo to list if arguments if :key is in :nginx_use_sudo_for list
|
29
|
+
def add_sudo_if_required argument_list, *keys
|
30
|
+
keys.each do | key |
|
31
|
+
if nginx_use_sudo? key
|
32
|
+
argument_list.unshift(:sudo)
|
33
|
+
break
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def nginx_use_sudo? key
|
39
|
+
(fetch(:nginx_sudo_tasks).include?(key) || fetch(:nginx_sudo_paths).include?(key))
|
40
|
+
end
|
41
|
+
|
42
|
+
class PasswdInteractionHandler
|
43
|
+
def on_data(command, stream_name, data, channel)
|
44
|
+
if data.include?("[sudo]")
|
45
|
+
ask(:password, 'sudo', echo: false)
|
46
|
+
channel.send_data("#{fetch(:password)}\n")
|
47
|
+
elsif data.include?("UNIX password")
|
48
|
+
ask(:password, 'UNIX', echo: false)
|
49
|
+
channel.send_data("#{fetch(:password)}\n")
|
50
|
+
else
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
@@ -1,46 +1,6 @@
|
|
1
|
-
|
2
|
-
task :defaults do
|
3
|
-
set :nginx_sudo_paths, -> { [:nginx_log_path, :nginx_sites_enabled_dir, :nginx_sites_available_dir] }
|
4
|
-
set :nginx_sudo_tasks, -> { ['nginx:start', 'nginx:stop', 'nginx:restart', 'nginx:reload', 'nginx:configtest', 'nginx:site:add', 'nginx:site:disable', 'nginx:site:enable', 'nginx:site:remove' ] }
|
5
|
-
set :nginx_log_path, -> { "#{shared_path}/log" }
|
6
|
-
set :nginx_service_path, -> { 'service nginx' }
|
7
|
-
set :nginx_static_dir, -> { "public" }
|
8
|
-
set :nginx_application_name, -> { fetch(:application) }
|
9
|
-
set :nginx_sites_enabled_dir, -> { "/etc/nginx/sites-enabled" }
|
10
|
-
set :nginx_sites_available_dir, -> { "/etc/nginx/sites-available" }
|
11
|
-
set :nginx_roles, -> { :web }
|
12
|
-
set :nginx_template, -> { :default }
|
13
|
-
set :nginx_use_ssl, -> { false }
|
14
|
-
set :nginx_ssl_certificate, -> { "#{fetch(:application)}.crt" }
|
15
|
-
set :nginx_ssl_certificate_path, -> { '/etc/ssl/certs' }
|
16
|
-
set :nginx_ssl_certificate_key, -> { "#{fetch(:application)}.key" }
|
17
|
-
set :nginx_ssl_certificate_key_path, -> { '/etc/ssl/private' }
|
18
|
-
set :app_server, -> { true }
|
19
|
-
end
|
20
|
-
end
|
1
|
+
git_plugin = self
|
21
2
|
|
22
3
|
namespace :nginx do
|
23
|
-
|
24
|
-
# prepend :sudo to list if arguments if :key is in :nginx_use_sudo_for list
|
25
|
-
def add_sudo_if_required argument_list, *keys
|
26
|
-
keys.each do | key |
|
27
|
-
if use_sudo? key
|
28
|
-
argument_list.unshift(:sudo)
|
29
|
-
break
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def use_sudo? key
|
35
|
-
return (fetch(:nginx_sudo_tasks).include?(key) || fetch(:nginx_sudo_paths).include?(key))
|
36
|
-
end
|
37
|
-
|
38
|
-
def valid_nginx_config?
|
39
|
-
test_sudo = use_sudo?('nginx:configtest') ? 'sudo ' : ''
|
40
|
-
nginx_service = fetch(:nginx_service_path)
|
41
|
-
test "[ $(#{test_sudo}#{nginx_service} configtest | grep -c 'fail') -eq 0 ]"
|
42
|
-
end
|
43
|
-
|
44
4
|
task :load_vars do
|
45
5
|
set :sites_available, -> { fetch(:nginx_sites_available_dir) }
|
46
6
|
set :sites_enabled, -> { fetch(:nginx_sites_enabled_dir) }
|
@@ -48,6 +8,8 @@ namespace :nginx do
|
|
48
8
|
set :available_application, -> { File.join(fetch(:sites_available), fetch(:nginx_application_name)) }
|
49
9
|
end
|
50
10
|
|
11
|
+
|
12
|
+
|
51
13
|
# validate_sudo_settings
|
52
14
|
task :validate_user_settings do
|
53
15
|
path_and_dir_keys = [:nginx_log_path, :nginx_sites_enabled_dir, :nginx_sites_available_dir]
|
@@ -64,7 +26,11 @@ namespace :nginx do
|
|
64
26
|
desc "Configtest nginx service"
|
65
27
|
task :configtest do
|
66
28
|
on release_roles fetch(:nginx_roles) do
|
67
|
-
|
29
|
+
nginx_service = fetch(:nginx_service_path)
|
30
|
+
execute(
|
31
|
+
"sudo #{nginx_service} configtest",
|
32
|
+
interaction_handler: PasswdInteractionHandler.new
|
33
|
+
)
|
68
34
|
end
|
69
35
|
end
|
70
36
|
|
@@ -73,8 +39,8 @@ namespace :nginx do
|
|
73
39
|
task command => ['nginx:validate_user_settings'] do
|
74
40
|
on release_roles fetch(:nginx_roles) do
|
75
41
|
arguments = fetch(:nginx_service_path), command
|
76
|
-
add_sudo_if_required arguments, "nginx:#{command}"
|
77
|
-
execute *arguments
|
42
|
+
git_plugin.add_sudo_if_required arguments, "nginx:#{command}"
|
43
|
+
execute *arguments, interaction_handler: PasswdInteractionHandler.new
|
78
44
|
end
|
79
45
|
end
|
80
46
|
before "nginx:#{command}", 'nginx:configtest' unless command == 'stop'
|
@@ -83,17 +49,19 @@ namespace :nginx do
|
|
83
49
|
task :create_log_paths do
|
84
50
|
on release_roles fetch(:nginx_roles) do
|
85
51
|
arguments = :mkdir, '-pv', fetch(:nginx_log_path)
|
86
|
-
add_sudo_if_required arguments, :nginx_log_path
|
87
|
-
execute *arguments
|
52
|
+
git_plugin.add_sudo_if_required arguments, :nginx_log_path
|
53
|
+
execute *arguments, interaction_handler: PasswdInteractionHandler.new
|
88
54
|
end
|
89
55
|
end
|
90
|
-
after 'deploy:check', 'nginx:create_log_paths'
|
56
|
+
after 'deploy:check', 'nginx:create_log_paths' if fetch(:nginx_log_path)
|
91
57
|
|
92
58
|
desc 'Compress JS and CSS with gzip'
|
93
59
|
task :gzip_static => ['nginx:load_vars'] do
|
94
60
|
on release_roles fetch(:nginx_roles) do
|
95
61
|
within release_path do
|
96
|
-
|
62
|
+
arguments = :find, "'#{fetch(:nginx_static_dir)}' -type f -name '*.js' -o -name '*.css' -exec gzip -v -9 -f -k {} \\;"
|
63
|
+
git_plugin.add_sudo_if_required arguments, :gzip_static
|
64
|
+
execute *arguments, interaction_handler: PasswdInteractionHandler.new
|
97
65
|
end
|
98
66
|
end
|
99
67
|
end
|
@@ -105,13 +73,13 @@ namespace :nginx do
|
|
105
73
|
within fetch(:sites_available) do
|
106
74
|
config_file = fetch(:nginx_template)
|
107
75
|
if config_file == :default
|
108
|
-
|
76
|
+
config_file = File.expand_path('../../../../templates/nginx.conf.erb', __FILE__)
|
109
77
|
end
|
110
78
|
config = ERB.new(File.read(config_file)).result(binding)
|
111
79
|
upload! StringIO.new(config), '/tmp/nginx.conf'
|
112
80
|
arguments = :mv, '/tmp/nginx.conf', fetch(:nginx_application_name)
|
113
|
-
add_sudo_if_required arguments, 'nginx:sites:add', :nginx_sites_available_dir
|
114
|
-
execute *arguments
|
81
|
+
git_plugin.add_sudo_if_required arguments, 'nginx:sites:add', :nginx_sites_available_dir
|
82
|
+
execute *arguments, interaction_handler: PasswdInteractionHandler.new
|
115
83
|
end
|
116
84
|
end
|
117
85
|
end
|
@@ -122,8 +90,8 @@ namespace :nginx do
|
|
122
90
|
if test "! [ -h #{fetch(:enabled_application)} ]"
|
123
91
|
within fetch(:sites_enabled) do
|
124
92
|
arguments = :ln, '-nfs', fetch(:available_application), fetch(:enabled_application)
|
125
|
-
add_sudo_if_required arguments, 'nginx:sites:enable', :nginx_sites_enabled_dir
|
126
|
-
execute *arguments
|
93
|
+
git_plugin.add_sudo_if_required arguments, 'nginx:sites:enable', :nginx_sites_enabled_dir
|
94
|
+
execute *arguments, interaction_handler: PasswdInteractionHandler.new
|
127
95
|
end
|
128
96
|
end
|
129
97
|
end
|
@@ -135,8 +103,8 @@ namespace :nginx do
|
|
135
103
|
if test "[ -f #{fetch(:enabled_application)} ]"
|
136
104
|
within fetch(:sites_enabled) do
|
137
105
|
arguments = :rm, '-f', fetch(:nginx_application_name)
|
138
|
-
add_sudo_if_required arguments, 'nginx:sites:disable', :nginx_sites_enabled_dir
|
139
|
-
execute *arguments
|
106
|
+
git_plugin.add_sudo_if_required arguments, 'nginx:sites:disable', :nginx_sites_enabled_dir
|
107
|
+
execute *arguments, interaction_handler: PasswdInteractionHandler.new
|
140
108
|
end
|
141
109
|
end
|
142
110
|
end
|
@@ -148,11 +116,12 @@ namespace :nginx do
|
|
148
116
|
if test "[ -f #{fetch(:available_application)} ]"
|
149
117
|
within fetch(:sites_available) do
|
150
118
|
arguments = :rm, fetch(:nginx_application_name)
|
151
|
-
add_sudo_if_required arguments, 'nginx:sites:remove', :nginx_sites_available_dir
|
152
|
-
execute *arguments
|
119
|
+
git_plugin.add_sudo_if_required arguments, 'nginx:sites:remove', :nginx_sites_available_dir
|
120
|
+
execute *arguments, interaction_handler: PasswdInteractionHandler.new
|
153
121
|
end
|
154
122
|
end
|
155
123
|
end
|
156
124
|
end
|
157
125
|
end
|
126
|
+
|
158
127
|
end
|
data/templates/nginx.conf.erb
CHANGED
@@ -32,7 +32,9 @@ server {
|
|
32
32
|
<% if fetch(:nginx_use_ssl) %>
|
33
33
|
listen 443;
|
34
34
|
ssl on;
|
35
|
-
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
35
|
+
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
36
|
+
ssl_protocols TLSv1.2;
|
37
|
+
ssl_ciphers HIGH:!aNULL:!MD5:!3DES;
|
36
38
|
ssl_certificate <%= fetch(:nginx_ssl_certificate_path) %>/<%= fetch(:nginx_ssl_certificate) %>;
|
37
39
|
ssl_certificate_key <%= fetch(:nginx_ssl_certificate_key_path) %>/<%= fetch(:nginx_ssl_certificate_key) %>;
|
38
40
|
<% else %>
|
@@ -54,6 +56,11 @@ server {
|
|
54
56
|
client_max_body_size 4G;
|
55
57
|
keepalive_timeout 10;
|
56
58
|
|
59
|
+
<% if fetch(:nginx_auth_basic_user_file) %>
|
60
|
+
auth_basic "Restricted Area";
|
61
|
+
auth_basic_user_file <%= fetch(:nginx_auth_basic_user_file) %>;
|
62
|
+
<% end %>
|
63
|
+
|
57
64
|
<% if fetch(:app_server) && (fetch(:app_server_socket) || fetch(:app_server_port))%>
|
58
65
|
location ^~ /assets/ {
|
59
66
|
gzip_static on;
|
@@ -66,10 +73,12 @@ server {
|
|
66
73
|
location @<%= fetch(:application) %>-app-server {
|
67
74
|
proxy_set_header X-Real-IP $remote_addr;
|
68
75
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
69
|
-
proxy_set_header X-FORWARDED_PROTO http;
|
70
76
|
proxy_set_header Host $http_host;
|
71
77
|
<% if fetch(:nginx_use_ssl) %>
|
72
78
|
proxy_set_header X-Forwarded-Proto https;
|
79
|
+
proxy_set_header X-Forwarded-Ssl on;
|
80
|
+
<% else %>
|
81
|
+
proxy_set_header X-Forwarded-Proto http;
|
73
82
|
<% end %>
|
74
83
|
<% if fetch(:nginx_read_timeout) %>
|
75
84
|
proxy_read_timeout <%= fetch(:nginx_read_timeout) %>;
|
metadata
CHANGED
@@ -1,62 +1,64 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano3-nginx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Ignacio Donoso
|
8
|
+
- treenewbee
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2019-06-19 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: capistrano
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
16
17
|
requirements:
|
17
|
-
- - "
|
18
|
+
- - "~>"
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0
|
20
|
+
version: '3.0'
|
20
21
|
type: :runtime
|
21
22
|
prerelease: false
|
22
23
|
version_requirements: !ruby/object:Gem::Requirement
|
23
24
|
requirements:
|
24
|
-
- - "
|
25
|
+
- - "~>"
|
25
26
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0
|
27
|
+
version: '3.0'
|
27
28
|
- !ruby/object:Gem::Dependency
|
28
29
|
name: rake
|
29
30
|
requirement: !ruby/object:Gem::Requirement
|
30
31
|
requirements:
|
31
|
-
- - "
|
32
|
+
- - "~>"
|
32
33
|
- !ruby/object:Gem::Version
|
33
34
|
version: '0'
|
34
35
|
type: :development
|
35
36
|
prerelease: false
|
36
37
|
version_requirements: !ruby/object:Gem::Requirement
|
37
38
|
requirements:
|
38
|
-
- - "
|
39
|
+
- - "~>"
|
39
40
|
- !ruby/object:Gem::Version
|
40
41
|
version: '0'
|
41
42
|
description: Adds suuport to nginx for Capistrano 3.x
|
42
|
-
email:
|
43
|
-
- jidonoso@gmail.com
|
43
|
+
email:
|
44
44
|
executables: []
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
48
|
- ".gitignore"
|
49
49
|
- Gemfile
|
50
|
+
- Gemfile.lock
|
50
51
|
- LICENSE
|
51
52
|
- LICENSE.txt
|
52
53
|
- README.md
|
53
54
|
- Rakefile
|
54
55
|
- capistrano3-nginx.gemspec
|
55
56
|
- lib/capistrano/nginx.rb
|
57
|
+
- lib/capistrano/nginx/version.rb
|
56
58
|
- lib/capistrano/tasks/nginx.rake
|
57
59
|
- lib/capistrano3-nginx.rb
|
58
60
|
- templates/nginx.conf.erb
|
59
|
-
homepage: https://github.com/
|
61
|
+
homepage: https://github.com/treenewbee/capistrano3-nginx
|
60
62
|
licenses:
|
61
63
|
- MIT
|
62
64
|
metadata: {}
|
@@ -76,9 +78,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
78
|
version: '0'
|
77
79
|
requirements: []
|
78
80
|
rubyforge_project:
|
79
|
-
rubygems_version: 2.
|
81
|
+
rubygems_version: 2.6.14.4
|
80
82
|
signing_key:
|
81
83
|
specification_version: 4
|
82
84
|
summary: Adds suuport to nginx for Capistrano 3.x
|
83
85
|
test_files: []
|
84
|
-
has_rdoc:
|