capistrano3-puma 5.1.1 → 5.2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -2
- data/README.md +7 -0
- data/Rakefile +1 -1
- data/lib/capistrano/puma/systemd.rb +2 -1
- data/lib/capistrano/puma/version.rb +3 -1
- data/lib/capistrano/tasks/systemd.rake +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 98e0fb64cfd73c2183c8ac641ec0e426f1721657254eeae1b6cebea4d9b34e78
|
|
4
|
+
data.tar.gz: 658219686493acef08d13c050c6d3c8536c980a6820d3d1165dcb5c3e3c80f89
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2423e9acfe501fe4404592ae5099e619aa168e055372ea7e56762a001e59cbefbdf6d32373e7c003a6abe2fefcde429887bddb5d02d7806b8969fa92297d70ad
|
|
7
|
+
data.tar.gz: f629c899266cbc6a97b40243c1edfdfa7ba23e6f519f837e6c05209de2845261ca25a823a84ecbf1045fe8566845deff8fb71c7fee967e1c9b46d67896f9652b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [5.
|
|
3
|
+
## [5.2.0](https://github.com/seuros/capistrano-puma/tree/5.2.0) (2021-09-11)
|
|
4
4
|
|
|
5
|
-
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.1.
|
|
5
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.1.1...5.2.0)
|
|
6
|
+
|
|
7
|
+
**Merged pull requests:**
|
|
8
|
+
|
|
9
|
+
- Add option for phased restart of puma [\#333](https://github.com/seuros/capistrano-puma/pull/333) ([phylor](https://github.com/phylor))
|
|
10
|
+
|
|
11
|
+
## [v5.1.1](https://github.com/seuros/capistrano-puma/tree/v5.1.1) (2021-09-03)
|
|
12
|
+
|
|
13
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.1.0...v5.1.1)
|
|
6
14
|
|
|
7
15
|
**Merged pull requests:**
|
|
8
16
|
|
data/README.md
CHANGED
|
@@ -128,6 +128,12 @@ To use customize environment variables
|
|
|
128
128
|
]
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
+
To use [phased restart](https://github.com/puma/puma/blob/master/docs/restart.md) for zero downtime deployments:
|
|
132
|
+
|
|
133
|
+
```ruby
|
|
134
|
+
set :puma_phased_restart, true
|
|
135
|
+
```
|
|
136
|
+
|
|
131
137
|
### Systemd Socket Activation
|
|
132
138
|
|
|
133
139
|
Systemd socket activation starts your app upon first request if it is not already running
|
|
@@ -192,6 +198,7 @@ Configurable options, shown here with defaults: Please note the configuration op
|
|
|
192
198
|
set :puma_lingering_user, fetch(:user)
|
|
193
199
|
set :puma_service_unit_env_file, nil
|
|
194
200
|
set :puma_service_unit_env_vars, []
|
|
201
|
+
set :puma_phased_restart, false
|
|
195
202
|
|
|
196
203
|
set :nginx_config_name, "#{fetch(:application)}_#{fetch(:stage)}"
|
|
197
204
|
set :nginx_flags, 'fail_timeout=0'
|
data/Rakefile
CHANGED
|
@@ -3,7 +3,7 @@ module Capistrano
|
|
|
3
3
|
include PumaCommon
|
|
4
4
|
|
|
5
5
|
def register_hooks
|
|
6
|
-
after 'deploy:finished', 'puma:
|
|
6
|
+
after 'deploy:finished', 'puma:smart_restart'
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def define_tasks
|
|
@@ -17,6 +17,7 @@ module Capistrano
|
|
|
17
17
|
set_if_empty :puma_systemctl_user, :system
|
|
18
18
|
set_if_empty :puma_enable_lingering, -> { fetch(:puma_systemctl_user) != :system }
|
|
19
19
|
set_if_empty :puma_lingering_user, -> { fetch(:user) }
|
|
20
|
+
set_if_empty :puma_phased_restart, -> { false }
|
|
20
21
|
end
|
|
21
22
|
|
|
22
23
|
def expanded_bundle_command
|
|
@@ -90,6 +90,15 @@ namespace :puma do
|
|
|
90
90
|
end
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
+
desc 'Restarts or reloads Puma service via systemd'
|
|
94
|
+
task :smart_restart do
|
|
95
|
+
if fetch(:puma_phased_restart)
|
|
96
|
+
invoke 'puma:reload'
|
|
97
|
+
else
|
|
98
|
+
invoke 'puma:restart'
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
93
102
|
desc 'Restart Puma service via systemd'
|
|
94
103
|
task :restart do
|
|
95
104
|
on roles(fetch(:puma_role)) do
|
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: 5.
|
|
4
|
+
version: 5.2.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: 2021-09-
|
|
11
|
+
date: 2021-09-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: capistrano
|