capistrano3-puma 3.1.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +10 -8
- data/README.md +15 -4
- data/capistrano3-puma.gemspec +1 -1
- data/lib/capistrano/puma.rb +1 -0
- data/lib/capistrano/puma/nginx.rb +1 -0
- data/lib/capistrano/puma/version.rb +1 -1
- data/lib/capistrano/tasks/jungle.rake +1 -1
- data/lib/capistrano/templates/nginx_conf.erb +5 -0
- data/lib/capistrano/templates/puma.rb.erb +2 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d3d97d6e6965faa5d7799a503e6730200c8f2c97c08a0eed22722bcde52927b4
|
4
|
+
data.tar.gz: 3b4616be230f21b14404d8c5581da21997458f6fff8e8eaf42d6c1532dea8ca7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16b7475339b600ddddccf305fa5b02195e7be896771934d5577960425be2bc14737f544cfc76f63d7ffdc2e58acf3d00b585fc0f7a6730b4465dc63d877c1a18
|
7
|
+
data.tar.gz: 7432fbe4b4eac9c069c01da4774b0e12542ffb093112ea99ed8a177417ee994b94834b226d8d5e2072632eabcbabadd67361191d7981a449ce98b9e4cf17b52b
|
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
## Changelog
|
2
|
-
-
|
2
|
+
- 4.0.0:
|
3
|
+
- Support puma 4.x
|
4
|
+
- 3.1.0:
|
3
5
|
- Don't load puma hooks by default.
|
4
6
|
- 3.0.0:
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
7
|
+
- Require capistrano 3.7+
|
8
|
+
- Implement the plugin system
|
9
|
+
- don't fail if puma was already running
|
10
|
+
- Added :puma_daemonize option (default is false)
|
9
11
|
|
10
12
|
- 2.0.0:
|
11
|
-
|
12
|
-
|
13
|
-
|
13
|
+
- Require puma 3.4+
|
14
|
+
- Require Capistrano 3.5+
|
15
|
+
- Require capistrano-bundler
|
14
16
|
|
15
17
|
- 1.2.0: add support for puma user for puma user @mcb & @seuros
|
16
18
|
- 1.1.0: Set :puma_preload_app to false; Reload Monit after uploading any monit configuration; Always refresh Gemfile @rafaelgoulart @suhailpatel @sime
|
data/README.md
CHANGED
@@ -36,6 +36,15 @@ To prevent loading the hooks of the plugin, add false to the load_hooks param.
|
|
36
36
|
install_plugin Capistrano::Puma::Monit, load_hooks: false # Monit tasks without hooks
|
37
37
|
```
|
38
38
|
|
39
|
+
To make it work with rvm, rbenv and chruby, install the plugin after corresponding library inclusion.
|
40
|
+
```ruby
|
41
|
+
# Capfile
|
42
|
+
|
43
|
+
require 'capistrano/rbenv'
|
44
|
+
require 'capistrano/puma'
|
45
|
+
install_plugin Capistrano::Puma
|
46
|
+
```
|
47
|
+
|
39
48
|
### Config
|
40
49
|
|
41
50
|
To list available tasks use `cap -T`
|
@@ -44,7 +53,7 @@ To upload puma config use:
|
|
44
53
|
```ruby
|
45
54
|
cap production puma:config
|
46
55
|
```
|
47
|
-
By default the file located in `shared/puma.
|
56
|
+
By default the file located in `shared/puma.rb`
|
48
57
|
|
49
58
|
|
50
59
|
Ensure that `tmp/pids` and ` tmp/sockets log` are shared (via `linked_dirs`):
|
@@ -92,7 +101,7 @@ Multi-bind can be set with an array in the puma_bind variable
|
|
92
101
|
```ruby
|
93
102
|
set :puma_bind, %w(tcp://0.0.0.0:9292 unix:///tmp/puma.sock)
|
94
103
|
```
|
95
|
-
* Listening on tcp://0.0.0.0:
|
104
|
+
* Listening on tcp://0.0.0.0:9292
|
96
105
|
* Listening on unix:///tmp/puma.sock
|
97
106
|
|
98
107
|
### Active Record
|
@@ -127,6 +136,7 @@ Configurable options, shown here with defaults: Please note the configuration op
|
|
127
136
|
set :puma_daemonize, false
|
128
137
|
set :puma_plugins, [] #accept array of plugins
|
129
138
|
set :puma_tag, fetch(:application)
|
139
|
+
set :puma_restart_command, 'bundle exec puma'
|
130
140
|
|
131
141
|
set :nginx_config_name, "#{fetch(:application)}_#{fetch(:stage)}"
|
132
142
|
set :nginx_flags, 'fail_timeout=0'
|
@@ -135,9 +145,10 @@ Configurable options, shown here with defaults: Please note the configuration op
|
|
135
145
|
set :nginx_sites_available_path, '/etc/nginx/sites-available'
|
136
146
|
set :nginx_sites_enabled_path, '/etc/nginx/sites-enabled'
|
137
147
|
set :nginx_socket_flags, fetch(:nginx_flags)
|
138
|
-
set :nginx_ssl_certificate, "/etc/ssl/certs
|
139
|
-
set :nginx_ssl_certificate_key, "/etc/ssl/private
|
148
|
+
set :nginx_ssl_certificate, "/etc/ssl/certs/#{fetch(:nginx_config_name)}.crt"
|
149
|
+
set :nginx_ssl_certificate_key, "/etc/ssl/private/#{fetch(:nginx_config_name)}.key"
|
140
150
|
set :nginx_use_ssl, false
|
151
|
+
set :nginx_downstream_uses_ssl, false
|
141
152
|
```
|
142
153
|
|
143
154
|
__Notes:__ If you are setting values for variables that might be used by other plugins, use `append` instead of `set`. For example:
|
data/capistrano3-puma.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency 'capistrano', '~> 3.7'
|
22
22
|
spec.add_dependency 'capistrano-bundler'
|
23
|
-
spec.add_dependency 'puma' , '~>
|
23
|
+
spec.add_dependency 'puma' , '~> 4.0'
|
24
24
|
spec.post_install_message = %q{
|
25
25
|
All plugins need to be explicitly installed with install_plugin.
|
26
26
|
Please see README.md
|
data/lib/capistrano/puma.rb
CHANGED
@@ -76,6 +76,7 @@ module Capistrano
|
|
76
76
|
set_if_empty :puma_preload_app, false
|
77
77
|
set_if_empty :puma_daemonize, false
|
78
78
|
set_if_empty :puma_tag, ''
|
79
|
+
set_if_empty :puma_restart_command, 'bundle exec puma'
|
79
80
|
|
80
81
|
# Chruby, Rbenv and RVM integration
|
81
82
|
append :chruby_map_bins, 'puma', 'pumactl'
|
@@ -39,7 +39,7 @@ namespace :puma do
|
|
39
39
|
task :add do
|
40
40
|
on roles(fetch(:puma_role)) do|role|
|
41
41
|
begin
|
42
|
-
sudo "/etc/init.d/puma add '#{current_path}' #{fetch(:puma_user, role.user)}"
|
42
|
+
sudo "/etc/init.d/puma add '#{current_path}' #{fetch(:puma_user, role.user)} '#{fetch(:puma_conf)}'"
|
43
43
|
rescue => error
|
44
44
|
warn error
|
45
45
|
end
|
@@ -46,6 +46,7 @@ server {
|
|
46
46
|
error_page 503 @503;
|
47
47
|
|
48
48
|
location @puma_<%= fetch(:nginx_config_name) %> {
|
49
|
+
proxy_http_version 1.1;
|
49
50
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
50
51
|
proxy_set_header Host $host;
|
51
52
|
proxy_redirect off;
|
@@ -54,7 +55,11 @@ server {
|
|
54
55
|
<% if fetch(:nginx_use_ssl) -%>
|
55
56
|
proxy_set_header X-Forwarded-Proto https;
|
56
57
|
<% else -%>
|
58
|
+
<% if fetch(:nginx_downstream_uses_ssl) -%>
|
59
|
+
proxy_set_header X-Forwarded-Proto https;
|
60
|
+
<% else -%>
|
57
61
|
proxy_set_header X-Forwarded-Proto http;
|
62
|
+
<% end -%>
|
58
63
|
<% end -%>
|
59
64
|
proxy_pass http://puma_<%= fetch(:nginx_config_name) %>;
|
60
65
|
# limit_req zone=one;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano3-puma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abdelkader Boudih
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '4.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '4.0'
|
55
55
|
description: Puma integration for Capistrano 3
|
56
56
|
email:
|
57
57
|
- Terminale@gmail.com
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.6
|
111
|
+
rubygems_version: 2.7.6
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Puma integration for Capistrano
|