capistrano3-puma 5.0.2 → 5.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2556d3d0f9c69518e9b8fff34c4e9a5414df32421c886749c5780ea76d4a29ab
4
- data.tar.gz: 346d5440671df45a98bb55b9156de333b6d75978c8370f323b8e191f87f5e84c
3
+ metadata.gz: 35a491d73286ea1106e102209ae0f109db2505ebe1997ae4069ffdf063769dff
4
+ data.tar.gz: aee6845893c931caeaf32b0c4c2e99ce2e9eebc8db28d9e225bbec687a7a6f77
5
5
  SHA512:
6
- metadata.gz: e223d91b3153aa0cd69ffb59ffa21f3ac4d49c98f006825930ad4ea385c6d89e79d61d2478af3314e583abcfc596dcef180fed80b7d2f6f7c5fa93f2169a76c1
7
- data.tar.gz: 6f1db9884b136d4595e65f7dc2bc7eb3027e8603e74e3f985b014a912ee8729c83b223a118ea37b39aa3981a82cead762fc26c959b4b171132624708400709f6
6
+ metadata.gz: 03f3f2f88622cbb6373f30569027d9df482a62ab41d0659023771fcf864dddf9b83d657967aaa1c8a9f82de6495f2cdd267219ec35b72289dd681d193ff48483
7
+ data.tar.gz: 2e3391e54baebd42cce79ff8c41af3682843a7757d8bd4ca2de9e671f7cd020e802d2af0c131a49b83b617b82e03298182ee61eafda16ee3fc7e5474334e531e
@@ -0,0 +1,19 @@
1
+ name: Mark stale issues and pull requests
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "30 1 * * *"
6
+
7
+ jobs:
8
+ stale:
9
+
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/stale@v3
14
+ with:
15
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
16
+ stale-issue-message: 'Stale issue message'
17
+ stale-pr-message: 'Stale pull request message'
18
+ stale-issue-label: 'no-issue-activity'
19
+ stale-pr-label: 'no-pr-activity'
data/CHANGELOG.md CHANGED
@@ -1,53 +1,313 @@
1
- ## Changelog
2
- - 5.0.0:
3
- - Support puma 5.0
4
- - Support SystemD service manager
5
- - 4.0.0:
6
- - Support puma 4.x
7
- - 3.1.0:
8
- - Don't load puma hooks by default.
9
- - 3.0.0:
10
- - Require capistrano 3.7+
11
- - Implement the plugin system
12
- - don't fail if puma was already running
13
- - Added :puma_daemonize option (default is false)
14
-
15
- - 2.0.0:
16
- - Require puma 3.4+
17
- - Require Capistrano 3.5+
18
- - Require capistrano-bundler
19
-
20
- - 1.2.0: add support for puma user for puma user @mcb & @seuros
21
- - 1.1.0: Set :puma_preload_app to false; Reload Monit after uploading any monit configuration; Always refresh Gemfile @rafaelgoulart @suhailpatel @sime
22
- - 1.0.0: Add activate control app @askagirl
23
- - 0.8.5: Fix smart_restart task to check if puma preloads app
24
- - 0.8.4: Allow patch method (Nginx template) @lonre
25
- - 0.8.2: Start task creates a conf file if none exists @stevemadere
26
- - 0.8.1: Fixed nginx task @hnatt, support for prune_bundler @behe
27
- - 0.8.0: Some changes
28
- - 0.7.0: added Nginx template generator @dfang
29
- - 0.6.1: added :puma_default_hooks, you can turn off the automatic hooks by setting it false
30
- - 0.6.0: Remove `daemonize true` from default puma.rb file. Explicitly pass `--daemon` flag when needed.
31
- - 0.5.1: Added worker_timeout option
32
- - 0.5.0: Bugs fixes
33
- - 0.4.2: Fix monit template to support chruby
34
- - 0.4.1: Fix puma jungle (debian)
35
- - 0.4.0: Multi-bind support
36
- - 0.3.7: Dependency bug fix
37
- - 0.3.5: Fixed a prehistoric bug
38
- - 0.3.4: I don't remember what i did here
39
- - 0.3.3: Puma jungle start fix
40
- - 0.3.2: Tag option support (require puma 2.8.2+)
41
- - 0.3.1: Typo fix
42
- - 0.3.0: Initial support for puma signals
43
- - 0.2.2: Application pre-loading is optional now (set puma_preload_app to false to turn it off)
44
- - 0.2.1: Tasks are run within rack context
45
- - 0.2.0: Support for puma `ActiveRecord::Base.establish_connection` on
46
- boot
47
- - 0.1.3: Capistrano 3.1 support
48
- - 0.1.2: Gemfile are refreshed between deploys now
49
- - 0.1.1: Initial support for Monit and configuration override added.
50
- - 0.1.0: Phased restart will be used if puma is in cluster mode
51
- - 0.0.9: puma.rb location changed to shared_path root. puma:check moved to after deploy:check
52
- - 0.0.8: puma.rb is automatically generated if not present. Fixed RVM issue.
53
- - 0.0.7: Gem pushed to rubygems as capistrano3-puma. Support of Redhat based OS for Jungle init script.
1
+ # Changelog
2
+
3
+ ## [5.1.1](https://github.com/seuros/capistrano-puma/tree/5.1.1) (2021-09-03)
4
+
5
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.1.0...5.1.1)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Reload also should support system mode. [\#331](https://github.com/seuros/capistrano-puma/pull/331) ([Eric-Guo](https://github.com/Eric-Guo))
10
+
11
+ ## [v5.1.0](https://github.com/seuros/capistrano-puma/tree/v5.1.0) (2021-09-02)
12
+
13
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.0.4...v5.1.0)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Phased restart [\#329](https://github.com/seuros/capistrano-puma/pull/329) ([mksvdmtr](https://github.com/mksvdmtr))
18
+ - fix typo in README.md [\#325](https://github.com/seuros/capistrano-puma/pull/325) ([Yuki-Inoue](https://github.com/Yuki-Inoue))
19
+ - Implement puma systemd sockets [\#324](https://github.com/seuros/capistrano-puma/pull/324) ([chriscz](https://github.com/chriscz))
20
+
21
+ ## [v5.0.4](https://github.com/seuros/capistrano-puma/tree/v5.0.4) (2021-03-03)
22
+
23
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.0.3...v5.0.4)
24
+
25
+ **Merged pull requests:**
26
+
27
+ - fix: puma\_systemctl\_user default value [\#319](https://github.com/seuros/capistrano-puma/pull/319) ([davegudge](https://github.com/davegudge))
28
+
29
+ ## [v5.0.3](https://github.com/seuros/capistrano-puma/tree/v5.0.3) (2021-02-23)
30
+
31
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.0.2...v5.0.3)
32
+
33
+ **Merged pull requests:**
34
+
35
+ - update systemd template accept puma\_service\_unit\_env\_file and puma\_se… [\#315](https://github.com/seuros/capistrano-puma/pull/315) ([iscreen](https://github.com/iscreen))
36
+ - Remove ExecStop from systemd unit file [\#314](https://github.com/seuros/capistrano-puma/pull/314) ([w-leads](https://github.com/w-leads))
37
+ - Default systemd service name on multi-app host [\#309](https://github.com/seuros/capistrano-puma/pull/309) ([bendilley](https://github.com/bendilley))
38
+ - Systemd user service manager and lingering [\#307](https://github.com/seuros/capistrano-puma/pull/307) ([farnsworth](https://github.com/farnsworth))
39
+ - Update nginx template to support X-Forwarded-Proto and remove executables from \*.erb files [\#283](https://github.com/seuros/capistrano-puma/pull/283) ([dapi](https://github.com/dapi))
40
+
41
+ ## [v5.0.2](https://github.com/seuros/capistrano-puma/tree/v5.0.2) (2020-12-07)
42
+
43
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.0.1...v5.0.2)
44
+
45
+ **Merged pull requests:**
46
+
47
+ - Single name for systemd config template [\#308](https://github.com/seuros/capistrano-puma/pull/308) ([bendilley](https://github.com/bendilley))
48
+
49
+ ## [v5.0.1](https://github.com/seuros/capistrano-puma/tree/v5.0.1) (2020-12-02)
50
+
51
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.0.0...v5.0.1)
52
+
53
+ **Merged pull requests:**
54
+
55
+ - Fix \#301, Task "puma:smart\_restart" not found [\#304](https://github.com/seuros/capistrano-puma/pull/304) ([Eric-Guo](https://github.com/Eric-Guo))
56
+
57
+ ## [v5.0.0](https://github.com/seuros/capistrano-puma/tree/v5.0.0) (2020-12-01)
58
+
59
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.0.0.beta1...v5.0.0)
60
+
61
+ ## [v5.0.0.beta1](https://github.com/seuros/capistrano-puma/tree/v5.0.0.beta1) (2020-11-04)
62
+
63
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v4.0.0...v5.0.0.beta1)
64
+
65
+ **Merged pull requests:**
66
+
67
+ - Add systemd support and puma 5 support [\#300](https://github.com/seuros/capistrano-puma/pull/300) ([ayamomiji](https://github.com/ayamomiji))
68
+ - Update nginx template [\#290](https://github.com/seuros/capistrano-puma/pull/290) ([neolyte](https://github.com/neolyte))
69
+ - Improve already running warning message [\#262](https://github.com/seuros/capistrano-puma/pull/262) ([jackbot](https://github.com/jackbot))
70
+
71
+ ## [v4.0.0](https://github.com/seuros/capistrano-puma/tree/v4.0.0) (2019-06-27)
72
+
73
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v3.1.1...v4.0.0)
74
+
75
+ **Merged pull requests:**
76
+
77
+ - Change 3.4 to 4.0 [\#285](https://github.com/seuros/capistrano-puma/pull/285) ([paulomcnally](https://github.com/paulomcnally))
78
+ - Revert "Fixed call parameter" [\#282](https://github.com/seuros/capistrano-puma/pull/282) ([stefanwild](https://github.com/stefanwild))
79
+ - Fixed call parameter [\#280](https://github.com/seuros/capistrano-puma/pull/280) ([stefanwild](https://github.com/stefanwild))
80
+ - Use HTTP 1.1 for proxying [\#277](https://github.com/seuros/capistrano-puma/pull/277) ([amiuhle](https://github.com/amiuhle))
81
+ - Update README.md [\#276](https://github.com/seuros/capistrano-puma/pull/276) ([poyzn](https://github.com/poyzn))
82
+ - fix typo in readme [\#275](https://github.com/seuros/capistrano-puma/pull/275) ([knt45](https://github.com/knt45))
83
+ - special case: setting X-Forwarded-Proto https even if ngnix is not using SSL [\#265](https://github.com/seuros/capistrano-puma/pull/265) ([anand-c-srinivasan](https://github.com/anand-c-srinivasan))
84
+ - \#243 Fix restart task, pumactl don't call bundle exec on restart [\#251](https://github.com/seuros/capistrano-puma/pull/251) ([pgericson](https://github.com/pgericson))
85
+ - Wrong path to puma config fixed [\#249](https://github.com/seuros/capistrano-puma/pull/249) ([atilla777](https://github.com/atilla777))
86
+ - Update README.md [\#247](https://github.com/seuros/capistrano-puma/pull/247) ([lozhn](https://github.com/lozhn))
87
+ - Added shared puma conf as argument to jungle:add [\#238](https://github.com/seuros/capistrano-puma/pull/238) ([anonoz](https://github.com/anonoz))
88
+
89
+ ## [v3.1.1](https://github.com/seuros/capistrano-puma/tree/v3.1.1) (2017-07-04)
90
+
91
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v3.1.0...v3.1.1)
92
+
93
+ **Merged pull requests:**
94
+
95
+ - Fix jungle setup for debian [\#235](https://github.com/seuros/capistrano-puma/pull/235) ([PavelBezpalov](https://github.com/PavelBezpalov))
96
+ - Force SSL/LTS with return directive [\#234](https://github.com/seuros/capistrano-puma/pull/234) ([notapatch](https://github.com/notapatch))
97
+ - Use `$host` to prevent forgery [\#232](https://github.com/seuros/capistrano-puma/pull/232) ([teeceepee](https://github.com/teeceepee))
98
+ - Fix undefined method 'as' on Capistrano::Puma and 'execute' should be wrapped in an 'on' block [\#230](https://github.com/seuros/capistrano-puma/pull/230) ([4xposed](https://github.com/4xposed))
99
+ - Wait for Monit to be reloaded [\#224](https://github.com/seuros/capistrano-puma/pull/224) ([ivanovaleksey](https://github.com/ivanovaleksey))
100
+ - Update README.md [\#223](https://github.com/seuros/capistrano-puma/pull/223) ([notapatch](https://github.com/notapatch))
101
+ - \[Fix \#219\] Call execute on backend [\#222](https://github.com/seuros/capistrano-puma/pull/222) ([ivanovaleksey](https://github.com/ivanovaleksey))
102
+ - Add option to specify the location of SSL certificates [\#221](https://github.com/seuros/capistrano-puma/pull/221) ([wynksaiddestroy](https://github.com/wynksaiddestroy))
103
+ - Fix the nginx\_conf can not upgrade to web sockets when using ActionCable [\#218](https://github.com/seuros/capistrano-puma/pull/218) ([Eric-Guo](https://github.com/Eric-Guo))
104
+ - Add stage to cap commands [\#216](https://github.com/seuros/capistrano-puma/pull/216) ([wynksaiddestroy](https://github.com/wynksaiddestroy))
105
+
106
+ ## [v3.1.0](https://github.com/seuros/capistrano-puma/tree/v3.1.0) (2017-03-24)
107
+
108
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v3.0.3...v3.1.0)
109
+
110
+ **Merged pull requests:**
111
+
112
+ - release 3.1.0 [\#212](https://github.com/seuros/capistrano-puma/pull/212) ([seuros](https://github.com/seuros))
113
+ - Minor fixes [\#211](https://github.com/seuros/capistrano-puma/pull/211) ([rojosinalma](https://github.com/rojosinalma))
114
+ - Fixes issue \#208 [\#209](https://github.com/seuros/capistrano-puma/pull/209) ([rojosinalma](https://github.com/rojosinalma))
115
+ - Give hint about appending variable values instead of setting them [\#207](https://github.com/seuros/capistrano-puma/pull/207) ([mcelicalderon](https://github.com/mcelicalderon))
116
+
117
+ ## [v3.0.3](https://github.com/seuros/capistrano-puma/tree/v3.0.3) (2017-03-23)
118
+
119
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v3.0.2...v3.0.3)
120
+
121
+ ## [v3.0.2](https://github.com/seuros/capistrano-puma/tree/v3.0.2) (2017-03-22)
122
+
123
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v3.0.1...v3.0.2)
124
+
125
+ **Merged pull requests:**
126
+
127
+ - Fix vars loading issue during plugin initialization [\#205](https://github.com/seuros/capistrano-puma/pull/205) ([ilyapoz](https://github.com/ilyapoz))
128
+
129
+ ## [v3.0.1](https://github.com/seuros/capistrano-puma/tree/v3.0.1) (2017-03-20)
130
+
131
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v3.0.0...v3.0.1)
132
+
133
+ ## [v3.0.0](https://github.com/seuros/capistrano-puma/tree/v3.0.0) (2017-03-18)
134
+
135
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v2.0.0...v3.0.0)
136
+
137
+ **Merged pull requests:**
138
+
139
+ - Release v3.0.0 candidate [\#201](https://github.com/seuros/capistrano-puma/pull/201) ([seuros](https://github.com/seuros))
140
+ - Add 'daemonize' config [\#194](https://github.com/seuros/capistrano-puma/pull/194) ([rhannequin](https://github.com/rhannequin))
141
+
142
+ ## [v2.0.0](https://github.com/seuros/capistrano-puma/tree/v2.0.0) (2017-03-08)
143
+
144
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v1.2.1...v2.0.0)
145
+
146
+ **Merged pull requests:**
147
+
148
+ - Skip puma start command if puma is running [\#198](https://github.com/seuros/capistrano-puma/pull/198) ([mizukmb](https://github.com/mizukmb))
149
+ - Fix puma:monit task for first deployment [\#187](https://github.com/seuros/capistrano-puma/pull/187) ([lucasalves](https://github.com/lucasalves))
150
+ - Update workers.rake [\#186](https://github.com/seuros/capistrano-puma/pull/186) ([treenewbee](https://github.com/treenewbee))
151
+ - typo [\#178](https://github.com/seuros/capistrano-puma/pull/178) ([BenjaminKim](https://github.com/BenjaminKim))
152
+ - Modify README file [\#176](https://github.com/seuros/capistrano-puma/pull/176) ([00dav00](https://github.com/00dav00))
153
+ - Remove trailing lines in ERB files [\#171](https://github.com/seuros/capistrano-puma/pull/171) ([papilip](https://github.com/papilip))
154
+ - Closing ActiveRecord connections before forking [\#170](https://github.com/seuros/capistrano-puma/pull/170) ([marcoschicote](https://github.com/marcoschicote))
155
+ - Add support to plugins [\#168](https://github.com/seuros/capistrano-puma/pull/168) ([seuros](https://github.com/seuros))
156
+ - Add server\_name to the http-\>https redirection server block [\#147](https://github.com/seuros/capistrano-puma/pull/147) ([bdewater](https://github.com/bdewater))
157
+ - Fix README: default value of puma\_preload\_app is false [\#145](https://github.com/seuros/capistrano-puma/pull/145) ([snoozer05](https://github.com/snoozer05))
158
+ - Respect the global puma\_user setting [\#139](https://github.com/seuros/capistrano-puma/pull/139) ([jhollinger](https://github.com/jhollinger))
159
+ - Add puma commands to chruby\_map\_bins. [\#135](https://github.com/seuros/capistrano-puma/pull/135) ([linjunpop](https://github.com/linjunpop))
160
+ - Run the shell as a login shell. [\#132](https://github.com/seuros/capistrano-puma/pull/132) ([kgiszczak](https://github.com/kgiszczak))
161
+ - Issue \#120 -- explicitly pass the config file location to pumactl [\#129](https://github.com/seuros/capistrano-puma/pull/129) ([lhagemann](https://github.com/lhagemann))
162
+ - Use SSHKit command\_map [\#128](https://github.com/seuros/capistrano-puma/pull/128) ([hbin](https://github.com/hbin))
163
+ - Update Readme [\#127](https://github.com/seuros/capistrano-puma/pull/127) ([h0lyalg0rithm](https://github.com/h0lyalg0rithm))
164
+
165
+ ## [v1.2.1](https://github.com/seuros/capistrano-puma/tree/v1.2.1) (2015-08-20)
166
+
167
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v1.2.0...v1.2.1)
168
+
169
+ **Merged pull requests:**
170
+
171
+ - Added fix for wrong arguments on puma stop [\#124](https://github.com/seuros/capistrano-puma/pull/124) ([rsov](https://github.com/rsov))
172
+
173
+ ## [v1.2.0](https://github.com/seuros/capistrano-puma/tree/v1.2.0) (2015-08-19)
174
+
175
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v1.1.0...v1.2.0)
176
+
177
+ **Implemented enhancements:**
178
+
179
+ - Adds ssl configuration for nginx [\#116](https://github.com/seuros/capistrano-puma/pull/116) ([mdesanti](https://github.com/mdesanti))
180
+
181
+ **Merged pull requests:**
182
+
183
+ - new puma user log [\#122](https://github.com/seuros/capistrano-puma/pull/122) ([seuros](https://github.com/seuros))
184
+ - Don't need establish connection block if `puma\_preload\_app' set to false [\#118](https://github.com/seuros/capistrano-puma/pull/118) ([hbin](https://github.com/hbin))
185
+ - Mcb/add support for puma user [\#117](https://github.com/seuros/capistrano-puma/pull/117) ([mcb](https://github.com/mcb))
186
+ - Fix puma\_monit\_bin [\#114](https://github.com/seuros/capistrano-puma/pull/114) ([msbrigna](https://github.com/msbrigna))
187
+ - Update monit tasks [\#113](https://github.com/seuros/capistrano-puma/pull/113) ([soylent](https://github.com/soylent))
188
+
189
+ ## [v1.1.0](https://github.com/seuros/capistrano-puma/tree/v1.1.0) (2015-06-23)
190
+
191
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v1.0.0...v1.1.0)
192
+
193
+ **Merged pull requests:**
194
+
195
+ - Always refresh Gemfile. Fixes \#109 [\#110](https://github.com/seuros/capistrano-puma/pull/110) ([sime](https://github.com/sime))
196
+ - Reload Monit after uploading any monit configuration [\#108](https://github.com/seuros/capistrano-puma/pull/108) ([suhailpatel](https://github.com/suhailpatel))
197
+ - Set :puma\_preload\_app to false [\#104](https://github.com/seuros/capistrano-puma/pull/104) ([rafaelgoulart](https://github.com/rafaelgoulart))
198
+
199
+ ## [v1.0.0](https://github.com/seuros/capistrano-puma/tree/v1.0.0) (2015-05-05)
200
+
201
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.9.0...v1.0.0)
202
+
203
+ **Merged pull requests:**
204
+
205
+ - Feature/add activate control app [\#103](https://github.com/seuros/capistrano-puma/pull/103) ([askagirl](https://github.com/askagirl))
206
+ - Missing 'r' in prune\_bundler [\#101](https://github.com/seuros/capistrano-puma/pull/101) ([sime](https://github.com/sime))
207
+
208
+ ## [v0.9.0](https://github.com/seuros/capistrano-puma/tree/v0.9.0) (2015-03-20)
209
+
210
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.8.5...v0.9.0)
211
+
212
+ **Merged pull requests:**
213
+
214
+ - Update Typo in README [\#97](https://github.com/seuros/capistrano-puma/pull/97) ([kcollignon](https://github.com/kcollignon))
215
+ - bundler prune should be automatically detect [\#96](https://github.com/seuros/capistrano-puma/pull/96) ([crhan](https://github.com/crhan))
216
+
217
+ ## [v0.8.5](https://github.com/seuros/capistrano-puma/tree/v0.8.5) (2015-01-30)
218
+
219
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.8.4...v0.8.5)
220
+
221
+ **Merged pull requests:**
222
+
223
+ - Fix smart\_restart task to check if puma preloads app [\#93](https://github.com/seuros/capistrano-puma/pull/93) ([sponomarev](https://github.com/sponomarev))
224
+
225
+ ## [v0.8.4](https://github.com/seuros/capistrano-puma/tree/v0.8.4) (2015-01-25)
226
+
227
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.8.3...v0.8.4)
228
+
229
+ **Merged pull requests:**
230
+
231
+ - Allow PATCH method [\#91](https://github.com/seuros/capistrano-puma/pull/91) ([lonre](https://github.com/lonre))
232
+ - Allow unix:/foo/ socket URLs [\#90](https://github.com/seuros/capistrano-puma/pull/90) ([indirect](https://github.com/indirect))
233
+ - Fix puma:monit task descriptions [\#88](https://github.com/seuros/capistrano-puma/pull/88) ([jc00ke](https://github.com/jc00ke))
234
+ - Convert to spaces [\#85](https://github.com/seuros/capistrano-puma/pull/85) ([lonre](https://github.com/lonre))
235
+ - Minor documentation correction [\#84](https://github.com/seuros/capistrano-puma/pull/84) ([neilbartley](https://github.com/neilbartley))
236
+ - appending :stage to puma's monit [\#81](https://github.com/seuros/capistrano-puma/pull/81) ([itsNikolay](https://github.com/itsNikolay))
237
+
238
+ ## [v0.8.3](https://github.com/seuros/capistrano-puma/tree/v0.8.3) (2014-10-28)
239
+
240
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.8.2...v0.8.3)
241
+
242
+ ## [v0.8.2](https://github.com/seuros/capistrano-puma/tree/v0.8.2) (2014-10-17)
243
+
244
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.8.1...v0.8.2)
245
+
246
+ **Merged pull requests:**
247
+
248
+ - Start task creates a conf file if none exists. [\#74](https://github.com/seuros/capistrano-puma/pull/74) ([stevemadere](https://github.com/stevemadere))
249
+
250
+ ## [v0.8.1](https://github.com/seuros/capistrano-puma/tree/v0.8.1) (2014-10-08)
251
+
252
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.8.0...v0.8.1)
253
+
254
+ **Merged pull requests:**
255
+
256
+ - Fix nginx config task work with roles [\#72](https://github.com/seuros/capistrano-puma/pull/72) ([hnatt](https://github.com/hnatt))
257
+ - Fix puma\_bind unix socket path [\#70](https://github.com/seuros/capistrano-puma/pull/70) ([hnatt](https://github.com/hnatt))
258
+ - Update nginx\_config task call example in README [\#69](https://github.com/seuros/capistrano-puma/pull/69) ([hnatt](https://github.com/hnatt))
259
+ - Added config option for prune\_bundler [\#68](https://github.com/seuros/capistrano-puma/pull/68) ([behe](https://github.com/behe))
260
+
261
+ ## [v0.8.0](https://github.com/seuros/capistrano-puma/tree/v0.8.0) (2014-09-23)
262
+
263
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.7.0...v0.8.0)
264
+
265
+ **Merged pull requests:**
266
+
267
+ - Update puma.cap to add missing , [\#65](https://github.com/seuros/capistrano-puma/pull/65) ([bryanl](https://github.com/bryanl))
268
+ - Fixed handling of multiple puma endpoints and of wildcard IP addresses [\#64](https://github.com/seuros/capistrano-puma/pull/64) ([jabbrwcky](https://github.com/jabbrwcky))
269
+ - Cannot call nginx:config cap task [\#61](https://github.com/seuros/capistrano-puma/pull/61) ([isc](https://github.com/isc))
270
+
271
+ ## [v0.7.0](https://github.com/seuros/capistrano-puma/tree/v0.7.0) (2014-08-07)
272
+
273
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.6.1...v0.7.0)
274
+
275
+ **Merged pull requests:**
276
+
277
+ - Add a task for uploading nginx site config and a generator for configuring template before uploadinging [\#57](https://github.com/seuros/capistrano-puma/pull/57) ([dfang](https://github.com/dfang))
278
+
279
+ ## [v0.6.1](https://github.com/seuros/capistrano-puma/tree/v0.6.1) (2014-07-03)
280
+
281
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.2.0...v0.6.1)
282
+
283
+ **Merged pull requests:**
284
+
285
+ - Explicitly daemonize when needed. [\#54](https://github.com/seuros/capistrano-puma/pull/54) ([crohr](https://github.com/crohr))
286
+ - Access and Error logs where backwards [\#52](https://github.com/seuros/capistrano-puma/pull/52) ([rottmanj](https://github.com/rottmanj))
287
+ - Fix jungle tasks [\#47](https://github.com/seuros/capistrano-puma/pull/47) ([RavWar](https://github.com/RavWar))
288
+ - Make monit play well with chruby. [\#46](https://github.com/seuros/capistrano-puma/pull/46) ([linjunpop](https://github.com/linjunpop))
289
+ - fix and beautify puma-deb, closes \#44 [\#45](https://github.com/seuros/capistrano-puma/pull/45) ([masterkain](https://github.com/masterkain))
290
+ - puma jungle start stop restart fix [\#38](https://github.com/seuros/capistrano-puma/pull/38) ([petertoth](https://github.com/petertoth))
291
+ - check redhat-release first [\#34](https://github.com/seuros/capistrano-puma/pull/34) ([marshall-lee](https://github.com/marshall-lee))
292
+ - set rack\_env before command execution [\#29](https://github.com/seuros/capistrano-puma/pull/29) ([arielze](https://github.com/arielze))
293
+
294
+ ## [v0.2.0](https://github.com/seuros/capistrano-puma/tree/v0.2.0) (2014-01-28)
295
+
296
+ [Full Changelog](https://github.com/seuros/capistrano-puma/compare/4068552029ae7f40963afaa6d45d2877c7806d8d...v0.2.0)
297
+
298
+ **Merged pull requests:**
299
+
300
+ - add a trigger to puma config, for support Issue \#25 [\#26](https://github.com/seuros/capistrano-puma/pull/26) ([crhan](https://github.com/crhan))
301
+ - bump version for support capistrano v3.1 [\#24](https://github.com/seuros/capistrano-puma/pull/24) ([crhan](https://github.com/crhan))
302
+ - capistrano v3.1 compatible improve: dependency solve [\#22](https://github.com/seuros/capistrano-puma/pull/22) ([crhan](https://github.com/crhan))
303
+ - phased-restart also check for pid file first [\#21](https://github.com/seuros/capistrano-puma/pull/21) ([crhan](https://github.com/crhan))
304
+ - check pid instead of state file [\#20](https://github.com/seuros/capistrano-puma/pull/20) ([crhan](https://github.com/crhan))
305
+ - fix puma/puma\#300: Gemfile not refreshed between deploys [\#19](https://github.com/seuros/capistrano-puma/pull/19) ([crhan](https://github.com/crhan))
306
+ - Update README.md [\#17](https://github.com/seuros/capistrano-puma/pull/17) ([James-Hendrickson](https://github.com/James-Hendrickson))
307
+ - Sane defaults and puma:check [\#15](https://github.com/seuros/capistrano-puma/pull/15) ([shaneog](https://github.com/shaneog))
308
+ - run puma and pumactl with bundler [\#14](https://github.com/seuros/capistrano-puma/pull/14) ([ayamomiji](https://github.com/ayamomiji))
309
+ - Ensures that it will bundle w/ capistrano 3.1 [\#6](https://github.com/seuros/capistrano-puma/pull/6) ([kyledecot](https://github.com/kyledecot))
310
+
311
+
312
+
313
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in capistrano-puma.gemspec
4
4
  gemspec
5
+
6
+ gem "bump", "~> 0.10.0"
7
+
8
+ gem "github_changelog_generator", "~> 1.16"
data/README.md CHANGED
@@ -32,7 +32,7 @@ install_plugin Capistrano::Puma::Daemon # If you using puma daemonized (not sup
32
32
  ```
33
33
  or
34
34
  ```ruby
35
- install_plugin Capistrano::Puma::Systemd # if you use SystemD
35
+ install_plugin Capistrano::Puma::Systemd # if you use SystemD
36
36
  ```
37
37
 
38
38
  To prevent loading the hooks of the plugin, add false to the load_hooks param.
@@ -47,8 +47,8 @@ To prevent loading the hooks of the plugin, add false to the load_hooks param.
47
47
  To make it work with rvm, rbenv and chruby, install the plugin after corresponding library inclusion.
48
48
  ```ruby
49
49
  # Capfile
50
-
51
- require 'capistrano/rbenv'
50
+
51
+ require 'capistrano/rbenv'
52
52
  require 'capistrano/puma'
53
53
  install_plugin Capistrano::Puma
54
54
  ```
@@ -116,6 +116,34 @@ To generate unit file use:
116
116
  cap production puma:systemd:config puma:systemd:enable
117
117
  ```
118
118
 
119
+ To use customize environment variables
120
+
121
+ ```ruby
122
+ set :puma_service_unit_env_file, '/etc/environment'
123
+ ```
124
+ ```ruby
125
+ set :puma_service_unit_env_vars, %w[
126
+ RAILS_ENV=development
127
+ PUMA_METRICS_HTTP=tcp://0.0.0.0:9393
128
+ ]
129
+ ```
130
+
131
+ ### Systemd Socket Activation
132
+
133
+ Systemd socket activation starts your app upon first request if it is not already running
134
+
135
+ ```ruby
136
+ set :puma_enable_socket_service, true
137
+ ```
138
+
139
+ For more information on socket activation have a look at the `systemd.socket` [man page](https://man7.org/linux/man-pages/man5/systemd.socket.5.html).
140
+
141
+ To restart the listening socket using Systemd run
142
+ ```
143
+ cap puma:systemd:restart_socket
144
+ ```
145
+ This would also restart the puma instance as the puma service depends on the socket service being active
146
+
119
147
  ### Multi bind
120
148
 
121
149
  Multi-bind can be set with an array in the puma_bind variable
@@ -158,6 +186,12 @@ Configurable options, shown here with defaults: Please note the configuration op
158
186
  set :puma_plugins, [] #accept array of plugins
159
187
  set :puma_tag, fetch(:application)
160
188
  set :puma_restart_command, 'bundle exec puma'
189
+ set :puma_service_unit_name, "puma_#{fetch(:application)}_#{fetch(:stage)}"
190
+ set :puma_systemctl_user, :system # accepts :user
191
+ set :puma_enable_lingering, fetch(:puma_systemctl_user) != :system # https://wiki.archlinux.org/index.php/systemd/User#Automatic_start-up_of_systemd_user_instances
192
+ set :puma_lingering_user, fetch(:user)
193
+ set :puma_service_unit_env_file, nil
194
+ set :puma_service_unit_env_vars, []
161
195
 
162
196
  set :nginx_config_name, "#{fetch(:application)}_#{fetch(:stage)}"
163
197
  set :nginx_flags, 'fail_timeout=0'
data/Rakefile CHANGED
@@ -1 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'github_changelog_generator/task'
3
+
4
+ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
5
+ config.user = 'seuros'
6
+ config.project = 'capistrano-puma'
7
+ config.issues = false
8
+ config.future_release = '5.1.1'
9
+ end
@@ -3,7 +3,7 @@ module Capistrano
3
3
  include PumaCommon
4
4
 
5
5
  def register_hooks
6
- after 'deploy:finished', 'puma:restart'
6
+ after 'deploy:finished', 'puma:reload'
7
7
  end
8
8
 
9
9
  def define_tasks
@@ -11,9 +11,47 @@ module Capistrano
11
11
  end
12
12
 
13
13
  def set_defaults
14
- set_if_empty :puma_systemd_conf_dir, '/etc/systemd/system'
15
14
  set_if_empty :puma_systemctl_bin, '/bin/systemctl'
16
- set_if_empty :puma_service_unit_name, 'puma'
15
+ set_if_empty :puma_service_unit_name, -> { "puma_#{fetch(:application)}_#{fetch(:stage)}" }
16
+ set_if_empty :puma_enable_socket_service, -> { false }
17
+ set_if_empty :puma_systemctl_user, :system
18
+ set_if_empty :puma_enable_lingering, -> { fetch(:puma_systemctl_user) != :system }
19
+ set_if_empty :puma_lingering_user, -> { fetch(:user) }
20
+ end
21
+
22
+ def expanded_bundle_command
23
+ backend.capture(:echo, SSHKit.config.command_map[:bundle]).strip
24
+ end
25
+
26
+ def fetch_systemd_unit_path
27
+ if fetch(:puma_systemctl_user) == :system
28
+ "/etc/systemd/system/"
29
+ else
30
+ home_dir = backend.capture :pwd
31
+ File.join(home_dir, ".config", "systemd", "user")
32
+ end
33
+ end
34
+
35
+ def systemd_command(*args)
36
+ command = [fetch(:puma_systemctl_bin)]
37
+
38
+ unless fetch(:puma_systemctl_user) == :system
39
+ command << "--user"
40
+ end
41
+
42
+ command + args
43
+ end
44
+
45
+ def sudo_if_needed(*command)
46
+ if fetch(:puma_systemctl_user) == :system
47
+ backend.sudo command.map(&:to_s).join(" ")
48
+ else
49
+ backend.execute(*command)
50
+ end
51
+ end
52
+
53
+ def execute_systemd(*args)
54
+ sudo_if_needed(*systemd_command(*args))
17
55
  end
18
56
  end
19
57
  end
@@ -1,3 +1,3 @@
1
1
  module Capistrano
2
- PUMAVERSION = '5.0.2'
2
+ PUMAVERSION = '5.1.1'
3
3
  end
@@ -1,5 +1,5 @@
1
1
  require 'capistrano/bundler'
2
- require "capistrano/plugin"
2
+ require 'capistrano/plugin'
3
3
 
4
4
  module Capistrano
5
5
  module PumaCommon
@@ -28,8 +28,7 @@ module Capistrano
28
28
  end.join("\n")
29
29
  end
30
30
 
31
-
32
- def template_puma(from, to, role)
31
+ def compiled_template_puma(from, role)
33
32
  @role = role
34
33
  file = [
35
34
  "lib/capistrano/templates/#{from}-#{role.hostname}-#{fetch(:stage)}.rb",
@@ -45,7 +44,50 @@ module Capistrano
45
44
  File.expand_path("../templates/#{from}.rb.erb", __FILE__)
46
45
  ].detect { |path| File.file?(path) }
47
46
  erb = File.read(file)
48
- backend.upload! StringIO.new(ERB.new(erb, nil, '-').result(binding)), to
47
+ StringIO.new(ERB.new(erb, nil, '-').result(binding))
48
+ end
49
+
50
+ def template_puma(from, to, role)
51
+ backend.upload! compiled_template_puma(from, role), to
52
+ end
53
+
54
+ PumaBind = Struct.new(:full_address, :kind, :address) do
55
+ def unix?
56
+ kind == :unix
57
+ end
58
+
59
+ def ssl?
60
+ kind == :ssl
61
+ end
62
+
63
+ def tcp
64
+ kind == :tcp || ssl?
65
+ end
66
+
67
+ def local
68
+ if unix?
69
+ self
70
+ else
71
+ PumaBind.new(
72
+ localize_address(full_address),
73
+ kind,
74
+ localize_address(address)
75
+ )
76
+ end
77
+ end
78
+
79
+ private
80
+
81
+ def localize_address(address)
82
+ address.gsub(/0\.0\.0\.0(.+)/, "127.0.0.1\\1")
83
+ end
84
+ end
85
+
86
+ def puma_binds
87
+ Array(fetch(:puma_bind)).map do |m|
88
+ etype, address = /(tcp|unix|ssl):\/{1,2}(.+)/.match(m).captures
89
+ PumaBind.new(m, etype.to_sym, address)
90
+ end
49
91
  end
50
92
  end
51
93
 
@@ -11,4 +11,12 @@ namespace :puma do
11
11
  end
12
12
  end
13
13
  end
14
+
15
+ desc 'Generate nginx configuration locally'
16
+ task :generate_nginx_config_locally do
17
+ fake_role = Struct.new(:hostname)
18
+ run_locally do
19
+ File.write('nginx.conf', git_plugin.compiled_template_puma("nginx_conf", fake_role.new("example.com")).string)
20
+ end
21
+ end
14
22
  end
@@ -7,24 +7,71 @@ namespace :puma do
7
7
  desc 'Config Puma systemd service'
8
8
  task :config do
9
9
  on roles(fetch(:puma_role)) do |role|
10
- unit_filename = "#{fetch(:puma_service_unit_name)}.service"
11
- git_plugin.template_puma 'puma.service', "#{fetch(:tmp_dir)}/#{unit_filename}", role
12
- sudo "mv #{fetch(:tmp_dir)}/#{unit_filename} #{fetch(:puma_systemd_conf_dir)}"
13
- sudo "#{fetch(:puma_systemctl_bin)} daemon-reload"
10
+
11
+ upload_compiled_template = lambda do |template_name, unit_filename|
12
+ git_plugin.template_puma template_name, "#{fetch(:tmp_dir)}/#{unit_filename}", role
13
+ systemd_path = fetch(:puma_systemd_conf_dir, git_plugin.fetch_systemd_unit_path)
14
+ if fetch(:puma_systemctl_user) == :system
15
+ sudo "mv #{fetch(:tmp_dir)}/#{unit_filename} #{systemd_path}"
16
+ else
17
+ execute :mkdir, "-p", systemd_path
18
+ execute :mv, "#{fetch(:tmp_dir)}/#{unit_filename}", "#{systemd_path}"
19
+ end
20
+ end
21
+
22
+ upload_compiled_template.call("puma.service", "#{fetch(:puma_service_unit_name)}.service")
23
+
24
+ if fetch(:puma_enable_socket_service)
25
+ upload_compiled_template.call("puma.socket", "#{fetch(:puma_service_unit_name)}.socket")
26
+ end
27
+
28
+ # Reload systemd
29
+ git_plugin.execute_systemd("daemon-reload")
30
+ end
31
+ end
32
+
33
+ desc 'Generate service configuration locally'
34
+ task :generate_config_locally do
35
+ fake_role = Struct.new(:hostname)
36
+ run_locally do
37
+ File.write('puma.service', git_plugin.compiled_template_puma("puma.service", fake_role.new("example.com")).string)
38
+ if fetch(:puma_enable_socket_service)
39
+ File.write('puma.socket', git_plugin.compiled_template_puma("puma.socket", fake_role.new("example.com")).string)
40
+ end
14
41
  end
15
42
  end
16
43
 
17
44
  desc 'Enable Puma systemd service'
18
45
  task :enable do
19
46
  on roles(fetch(:puma_role)) do
20
- sudo "#{fetch(:puma_systemctl_bin)} enable #{fetch(:puma_service_unit_name)}"
47
+ git_plugin.execute_systemd("enable", fetch(:puma_service_unit_name))
48
+ git_plugin.execute_systemd("enable", fetch(:puma_service_unit_name) + ".socket") if fetch(:puma_enable_socket_service)
49
+
50
+ if fetch(:puma_systemctl_user) != :system && fetch(:puma_enable_lingering)
51
+ execute :loginctl, "enable-linger", fetch(:puma_lingering_user)
52
+ end
21
53
  end
22
54
  end
23
55
 
24
56
  desc 'Disable Puma systemd service'
25
57
  task :disable do
26
58
  on roles(fetch(:puma_role)) do
27
- sudo "#{fetch(:puma_systemctl_bin)} disable #{fetch(:puma_service_unit_name)}"
59
+ git_plugin.execute_systemd("disable", fetch(:puma_service_unit_name))
60
+ git_plugin.execute_systemd("disable", fetch(:puma_service_unit_name) + ".socket") if fetch(:puma_enable_socket_service)
61
+ end
62
+ end
63
+
64
+ desc 'Stop Puma socket via systemd'
65
+ task :stop_socket do
66
+ on roles(fetch(:puma_role)) do
67
+ git_plugin.execute_systemd("stop", fetch(:puma_service_unit_name) + ".socket")
68
+ end
69
+ end
70
+
71
+ desc 'Restart Puma socket via systemd'
72
+ task :restart_socket do
73
+ on roles(fetch(:puma_role)) do
74
+ git_plugin.execute_systemd("restart", fetch(:puma_service_unit_name) + ".socket")
28
75
  end
29
76
  end
30
77
  end
@@ -32,28 +79,49 @@ namespace :puma do
32
79
  desc 'Start Puma service via systemd'
33
80
  task :start do
34
81
  on roles(fetch(:puma_role)) do
35
- sudo "#{fetch(:puma_systemctl_bin)} start #{fetch(:puma_service_unit_name)}"
82
+ git_plugin.execute_systemd("start", fetch(:puma_service_unit_name))
36
83
  end
37
84
  end
38
85
 
39
86
  desc 'Stop Puma service via systemd'
40
87
  task :stop do
41
88
  on roles(fetch(:puma_role)) do
42
- sudo "#{fetch(:puma_systemctl_bin)} stop #{fetch(:puma_service_unit_name)}"
89
+ git_plugin.execute_systemd("stop", fetch(:puma_service_unit_name))
43
90
  end
44
91
  end
45
92
 
46
93
  desc 'Restart Puma service via systemd'
47
94
  task :restart do
48
95
  on roles(fetch(:puma_role)) do
49
- sudo "#{fetch(:puma_systemctl_bin)} restart #{fetch(:puma_service_unit_name)}"
96
+ git_plugin.execute_systemd("restart", fetch(:puma_service_unit_name))
97
+ end
98
+ end
99
+
100
+ desc 'Reload Puma service via systemd'
101
+ task :reload do
102
+ on roles(fetch(:puma_role)) do
103
+ service_ok = if fetch(:puma_systemctl_user) == :system
104
+ execute("#{fetch(:puma_systemctl_bin)} status #{fetch(:puma_service_unit_name)} > /dev/null", raise_on_non_zero_exit: false)
105
+ else
106
+ execute("#{fetch(:puma_systemctl_bin)} --user status #{fetch(:puma_service_unit_name)} > /dev/null", raise_on_non_zero_exit: false)
107
+ end
108
+ cmd = 'reload'
109
+ if !service_ok
110
+ cmd = 'restart'
111
+ end
112
+ if fetch(:puma_systemctl_user) == :system
113
+ sudo "#{fetch(:puma_systemctl_bin)} #{cmd} #{fetch(:puma_service_unit_name)}"
114
+ else
115
+ execute "#{fetch(:puma_systemctl_bin)}", "--user", cmd, fetch(:puma_service_unit_name)
116
+ end
50
117
  end
51
118
  end
52
119
 
53
120
  desc 'Get Puma service status via systemd'
54
121
  task :status do
55
122
  on roles(fetch(:puma_role)) do
56
- sudo "#{fetch(:puma_systemctl_bin)} status #{fetch(:puma_service_unit_name)}"
123
+ git_plugin.execute_systemd("status", fetch(:puma_service_unit_name))
124
+ git_plugin.execute_systemd("status", fetch(:puma_service_unit_name) + ".socket") if fetch(:puma_enable_socket_service)
57
125
  end
58
126
  end
59
127
  end
@@ -1,12 +1,11 @@
1
1
  upstream puma_<%= fetch(:nginx_config_name) %> { <%
2
- @backends = [fetch(:puma_bind)].flatten.map do |m|
3
- etype, address = /(tcp|unix|ssl):\/{1,2}(.+)/.match(m).captures
4
- if etype == 'unix'
5
- "server #{etype}:#{address} #{fetch(:nginx_socket_flags)};"
6
- else
7
- "server #{address.gsub(/0\.0\.0\.0(.+)/, "127.0.0.1\\1")} #{fetch(:nginx_http_flags)};"
2
+ @backends = puma_binds.map do |bind|
3
+ if bind.unix?
4
+ "server unix:#{bind.address} #{fetch(:nginx_socket_flags)};"
5
+ else
6
+ "server #{bind.local.address} #{fetch(:nginx_http_flags)};"
7
+ end
8
8
  end
9
- end
10
9
  %><% @backends.each do |server| %>
11
10
  <%= server %><% end %>
12
11
  }
@@ -51,6 +50,7 @@ server {
51
50
  location @puma_<%= fetch(:nginx_config_name) %> {
52
51
  proxy_http_version 1.1;
53
52
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
53
+ proxy_set_header X-Forwarded-Proto $scheme;
54
54
  proxy_set_header Host $host;
55
55
  proxy_redirect off;
56
56
  proxy_set_header Upgrade $http_upgrade;
File without changes
@@ -1,18 +1,28 @@
1
1
  [Unit]
2
2
  Description=Puma HTTP Server for <%= "#{fetch(:application)} (#{fetch(:stage)})" %>
3
3
  After=network.target
4
+ <%= "Requires=#{fetch(:puma_service_unit_name)}.socket" if fetch(:puma_enable_socket_service) %>
4
5
 
5
6
  [Service]
6
7
  Type=simple
7
- User=<%= puma_user(@role) %>
8
+ <%="User=#{puma_user(@role)}" if fetch(:puma_systemctl_user) == :system %>
8
9
  WorkingDirectory=<%= current_path %>
9
- ExecStart=<%= SSHKit.config.command_map[:bundle] %> exec puma -C <%= fetch(:puma_conf) %>
10
- ExecReload=/bin/kill -TSTP $MAINPID
11
- ExecStop=/bin/kill -TERM $MAINPID
10
+ # Support older bundler versions where file descriptors weren't kept
11
+ # See https://github.com/rubygems/rubygems/issues/3254
12
+ ExecStart=<%= expanded_bundle_command %> exec --keep-file-descriptors puma -C <%= fetch(:puma_conf) %>
13
+ ExecReload=/bin/kill -USR1 $MAINPID
12
14
  StandardOutput=append:<%= fetch(:puma_access_log) %>
13
15
  StandardError=append:<%= fetch(:puma_error_log) %>
16
+ <%="EnvironmentFile=#{fetch(:puma_service_unit_env_file)}" if fetch(:puma_service_unit_env_file) %>
17
+
18
+ <% fetch(:puma_service_unit_env_vars, []).each do |environment_variable| %>
19
+ <%="Environment=#{environment_variable}" %>
20
+ <% end %>
14
21
 
15
22
  Restart=always
23
+ RestartSec=1
24
+
25
+ SyslogIdentifier=puma
16
26
 
17
27
  [Install]
18
- WantedBy=multi-user.target
28
+ WantedBy=<%=(fetch(:puma_systemctl_user) == :system) ? "multi-user.target" : "default.target"%>
@@ -0,0 +1,22 @@
1
+ [Unit]
2
+ Description=Puma HTTP Server Accept Sockets for <%= "#{fetch(:application)} (#{fetch(:stage)})" %>
3
+
4
+ [Socket]
5
+ <% puma_binds.each do |bind| -%>
6
+ <%= "ListenStream=#{bind.local.address}" %>
7
+ <% end -%>
8
+
9
+ # Don't let systemd accept the request, wait for Puma to do that.
10
+ # Systemd will start the puma service upon first request if it wasn't started.
11
+ #
12
+ # You might also want to set your Nginx upstream to have a fail_timeout large enough to accomodate your app's
13
+ # startup time.
14
+ Accept=no
15
+ <%= "NoDelay=true" if fetch(:puma_systemctl_user) == :system %>
16
+ ReusePort=true
17
+ Backlog=1024
18
+
19
+ SyslogIdentifier=puma_socket
20
+
21
+ [Install]
22
+ WantedBy=sockets.target
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.0.2
4
+ version: 5.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-07 00:00:00.000000000 Z
11
+ date: 2021-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -65,6 +65,7 @@ executables: []
65
65
  extensions: []
66
66
  extra_rdoc_files: []
67
67
  files:
68
+ - ".github/workflows/stale.yml"
68
69
  - ".gitignore"
69
70
  - CHANGELOG.md
70
71
  - CONTRIBUTORS.md
@@ -93,6 +94,7 @@ files:
93
94
  - lib/capistrano/templates/puma-rpm.erb
94
95
  - lib/capistrano/templates/puma.rb.erb
95
96
  - lib/capistrano/templates/puma.service.erb
97
+ - lib/capistrano/templates/puma.socket.erb
96
98
  - lib/capistrano/templates/puma_monit.conf.erb
97
99
  - lib/capistrano/templates/run-puma.erb
98
100
  - lib/capistrano3-puma.rb