capistrano3-puma 1.2.1 → 6.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +328 -0
- data/LICENSE.txt +1 -1
- data/README.md +44 -103
- data/lib/capistrano/puma/nginx.rb +22 -1
- data/lib/capistrano/puma/systemd.rb +63 -0
- data/lib/capistrano/puma.rb +123 -1
- data/lib/capistrano/tasks/nginx.rake +12 -2
- data/lib/capistrano/tasks/systemd.rake +139 -0
- data/lib/capistrano/templates/nginx_conf.erb +43 -28
- data/lib/capistrano/templates/puma.service.erb +40 -0
- data/lib/capistrano/templates/puma.socket.erb +22 -0
- data/lib/generators/capistrano/nginx_puma/config_generator.rb +0 -1
- metadata +39 -32
- data/.gitignore +0 -18
- data/Gemfile +0 -4
- data/Rakefile +0 -1
- data/capistrano3-puma.gemspec +0 -23
- data/lib/capistrano/puma/jungle.rb +0 -2
- data/lib/capistrano/puma/monit.rb +0 -2
- data/lib/capistrano/puma/version.rb +0 -5
- data/lib/capistrano/puma/workers.rb +0 -2
- data/lib/capistrano/tasks/jungle.rake +0 -81
- data/lib/capistrano/tasks/monit.rake +0 -72
- data/lib/capistrano/tasks/puma.rake +0 -197
- data/lib/capistrano/tasks/workers.rake +0 -38
- data/lib/capistrano/templates/puma-deb.erb +0 -336
- data/lib/capistrano/templates/puma-rpm.erb +0 -328
- data/lib/capistrano/templates/puma.rb.erb +0 -42
- data/lib/capistrano/templates/puma_monit.conf.erb +0 -7
- data/lib/capistrano/templates/run-puma.erb +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8d2f6376b7e7c2838e8d06d7acb249e7b4cca75982bd440e2ad8952f80941132
|
4
|
+
data.tar.gz: 24ca957bc88c4f06d7a11dea7c70b72f77ca275bc46a77b6eb44f98bc51b5a3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0d445a032ad196fd65b8aa863c1fb049aec6f9e8f47f22cd2d05993555c354e110bfb397d1a001b6ee0b3cb9b19e38c3d6fe76bba47d5682b17992910a5717c
|
7
|
+
data.tar.gz: 9bba6960b9246b4877b02baa6339baf7a940caf16bcf54be2c0148850f96b7af1e68a07a97d03ac07bbc978275e1ea6ca44812587da942e176b674d230d2a88c
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,328 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
[Unreleased](https://github.com/seuros/capistrano-puma/compare/v5.2.0...master)
|
4
|
+
- Removed support for support for monit and upstart. (will add them back if someone is willing to maintain them)
|
5
|
+
- Sync configuration with capistrano-sidekiq
|
6
|
+
- Support for notify systemd service. Add sd_notify gem to your Gemfile.
|
7
|
+
- Add example application for easier testing.
|
8
|
+
- Deprecate Nginx support. (configuration tools should be preferred over capistrano tasks)
|
9
|
+
|
10
|
+
## [5.2.0](https://github.com/seuros/capistrano-puma/tree/5.2.0) (2021-09-11)
|
11
|
+
|
12
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.1.1...5.2.0)
|
13
|
+
|
14
|
+
**Merged pull requests:**
|
15
|
+
|
16
|
+
- Add option for phased restart of puma [\#333](https://github.com/seuros/capistrano-puma/pull/333) ([phylor](https://github.com/phylor))
|
17
|
+
|
18
|
+
## [v5.1.1](https://github.com/seuros/capistrano-puma/tree/v5.1.1) (2021-09-03)
|
19
|
+
|
20
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.1.0...v5.1.1)
|
21
|
+
|
22
|
+
**Merged pull requests:**
|
23
|
+
|
24
|
+
- Reload also should support system mode. [\#331](https://github.com/seuros/capistrano-puma/pull/331) ([Eric-Guo](https://github.com/Eric-Guo))
|
25
|
+
|
26
|
+
## [v5.1.0](https://github.com/seuros/capistrano-puma/tree/v5.1.0) (2021-09-02)
|
27
|
+
|
28
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.0.4...v5.1.0)
|
29
|
+
|
30
|
+
**Merged pull requests:**
|
31
|
+
|
32
|
+
- Phased restart [\#329](https://github.com/seuros/capistrano-puma/pull/329) ([mksvdmtr](https://github.com/mksvdmtr))
|
33
|
+
- fix typo in README.md [\#325](https://github.com/seuros/capistrano-puma/pull/325) ([Yuki-Inoue](https://github.com/Yuki-Inoue))
|
34
|
+
- Implement puma systemd sockets [\#324](https://github.com/seuros/capistrano-puma/pull/324) ([chriscz](https://github.com/chriscz))
|
35
|
+
|
36
|
+
## [v5.0.4](https://github.com/seuros/capistrano-puma/tree/v5.0.4) (2021-03-03)
|
37
|
+
|
38
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.0.3...v5.0.4)
|
39
|
+
|
40
|
+
**Merged pull requests:**
|
41
|
+
|
42
|
+
- fix: puma\_systemctl\_user default value [\#319](https://github.com/seuros/capistrano-puma/pull/319) ([davegudge](https://github.com/davegudge))
|
43
|
+
|
44
|
+
## [v5.0.3](https://github.com/seuros/capistrano-puma/tree/v5.0.3) (2021-02-23)
|
45
|
+
|
46
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.0.2...v5.0.3)
|
47
|
+
|
48
|
+
**Merged pull requests:**
|
49
|
+
|
50
|
+
- 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))
|
51
|
+
- Remove ExecStop from systemd unit file [\#314](https://github.com/seuros/capistrano-puma/pull/314) ([w-leads](https://github.com/w-leads))
|
52
|
+
- Default systemd service name on multi-app host [\#309](https://github.com/seuros/capistrano-puma/pull/309) ([bendilley](https://github.com/bendilley))
|
53
|
+
- Systemd user service manager and lingering [\#307](https://github.com/seuros/capistrano-puma/pull/307) ([farnsworth](https://github.com/farnsworth))
|
54
|
+
- 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))
|
55
|
+
|
56
|
+
## [v5.0.2](https://github.com/seuros/capistrano-puma/tree/v5.0.2) (2020-12-07)
|
57
|
+
|
58
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.0.1...v5.0.2)
|
59
|
+
|
60
|
+
**Merged pull requests:**
|
61
|
+
|
62
|
+
- Single name for systemd config template [\#308](https://github.com/seuros/capistrano-puma/pull/308) ([bendilley](https://github.com/bendilley))
|
63
|
+
|
64
|
+
## [v5.0.1](https://github.com/seuros/capistrano-puma/tree/v5.0.1) (2020-12-02)
|
65
|
+
|
66
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.0.0...v5.0.1)
|
67
|
+
|
68
|
+
**Merged pull requests:**
|
69
|
+
|
70
|
+
- Fix \#301, Task "puma:smart\_restart" not found [\#304](https://github.com/seuros/capistrano-puma/pull/304) ([Eric-Guo](https://github.com/Eric-Guo))
|
71
|
+
|
72
|
+
## [v5.0.0](https://github.com/seuros/capistrano-puma/tree/v5.0.0) (2020-12-01)
|
73
|
+
|
74
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v5.0.0.beta1...v5.0.0)
|
75
|
+
|
76
|
+
## [v5.0.0.beta1](https://github.com/seuros/capistrano-puma/tree/v5.0.0.beta1) (2020-11-04)
|
77
|
+
|
78
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v4.0.0...v5.0.0.beta1)
|
79
|
+
|
80
|
+
**Merged pull requests:**
|
81
|
+
|
82
|
+
- Add systemd support and puma 5 support [\#300](https://github.com/seuros/capistrano-puma/pull/300) ([ayamomiji](https://github.com/ayamomiji))
|
83
|
+
- Update nginx template [\#290](https://github.com/seuros/capistrano-puma/pull/290) ([neolyte](https://github.com/neolyte))
|
84
|
+
- Improve already running warning message [\#262](https://github.com/seuros/capistrano-puma/pull/262) ([jackbot](https://github.com/jackbot))
|
85
|
+
|
86
|
+
## [v4.0.0](https://github.com/seuros/capistrano-puma/tree/v4.0.0) (2019-06-27)
|
87
|
+
|
88
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v3.1.1...v4.0.0)
|
89
|
+
|
90
|
+
**Merged pull requests:**
|
91
|
+
|
92
|
+
- Change 3.4 to 4.0 [\#285](https://github.com/seuros/capistrano-puma/pull/285) ([paulomcnally](https://github.com/paulomcnally))
|
93
|
+
- Revert "Fixed call parameter" [\#282](https://github.com/seuros/capistrano-puma/pull/282) ([stefanwild](https://github.com/stefanwild))
|
94
|
+
- Fixed call parameter [\#280](https://github.com/seuros/capistrano-puma/pull/280) ([stefanwild](https://github.com/stefanwild))
|
95
|
+
- Use HTTP 1.1 for proxying [\#277](https://github.com/seuros/capistrano-puma/pull/277) ([amiuhle](https://github.com/amiuhle))
|
96
|
+
- Update README.md [\#276](https://github.com/seuros/capistrano-puma/pull/276) ([poyzn](https://github.com/poyzn))
|
97
|
+
- fix typo in readme [\#275](https://github.com/seuros/capistrano-puma/pull/275) ([knt45](https://github.com/knt45))
|
98
|
+
- 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))
|
99
|
+
- \#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))
|
100
|
+
- Wrong path to puma config fixed [\#249](https://github.com/seuros/capistrano-puma/pull/249) ([atilla777](https://github.com/atilla777))
|
101
|
+
- Update README.md [\#247](https://github.com/seuros/capistrano-puma/pull/247) ([lozhn](https://github.com/lozhn))
|
102
|
+
- Added shared puma conf as argument to jungle:add [\#238](https://github.com/seuros/capistrano-puma/pull/238) ([anonoz](https://github.com/anonoz))
|
103
|
+
|
104
|
+
## [v3.1.1](https://github.com/seuros/capistrano-puma/tree/v3.1.1) (2017-07-04)
|
105
|
+
|
106
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v3.1.0...v3.1.1)
|
107
|
+
|
108
|
+
**Merged pull requests:**
|
109
|
+
|
110
|
+
- Fix jungle setup for debian [\#235](https://github.com/seuros/capistrano-puma/pull/235) ([PavelBezpalov](https://github.com/PavelBezpalov))
|
111
|
+
- Force SSL/LTS with return directive [\#234](https://github.com/seuros/capistrano-puma/pull/234) ([notapatch](https://github.com/notapatch))
|
112
|
+
- Use `$host` to prevent forgery [\#232](https://github.com/seuros/capistrano-puma/pull/232) ([teeceepee](https://github.com/teeceepee))
|
113
|
+
- 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))
|
114
|
+
- Wait for Monit to be reloaded [\#224](https://github.com/seuros/capistrano-puma/pull/224) ([ivanovaleksey](https://github.com/ivanovaleksey))
|
115
|
+
- Update README.md [\#223](https://github.com/seuros/capistrano-puma/pull/223) ([notapatch](https://github.com/notapatch))
|
116
|
+
- \[Fix \#219\] Call execute on backend [\#222](https://github.com/seuros/capistrano-puma/pull/222) ([ivanovaleksey](https://github.com/ivanovaleksey))
|
117
|
+
- Add option to specify the location of SSL certificates [\#221](https://github.com/seuros/capistrano-puma/pull/221) ([wynksaiddestroy](https://github.com/wynksaiddestroy))
|
118
|
+
- 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))
|
119
|
+
- Add stage to cap commands [\#216](https://github.com/seuros/capistrano-puma/pull/216) ([wynksaiddestroy](https://github.com/wynksaiddestroy))
|
120
|
+
|
121
|
+
## [v3.1.0](https://github.com/seuros/capistrano-puma/tree/v3.1.0) (2017-03-24)
|
122
|
+
|
123
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v3.0.3...v3.1.0)
|
124
|
+
|
125
|
+
**Merged pull requests:**
|
126
|
+
|
127
|
+
- release 3.1.0 [\#212](https://github.com/seuros/capistrano-puma/pull/212) ([seuros](https://github.com/seuros))
|
128
|
+
- Minor fixes [\#211](https://github.com/seuros/capistrano-puma/pull/211) ([rojosinalma](https://github.com/rojosinalma))
|
129
|
+
- Fixes issue \#208 [\#209](https://github.com/seuros/capistrano-puma/pull/209) ([rojosinalma](https://github.com/rojosinalma))
|
130
|
+
- Give hint about appending variable values instead of setting them [\#207](https://github.com/seuros/capistrano-puma/pull/207) ([mcelicalderon](https://github.com/mcelicalderon))
|
131
|
+
|
132
|
+
## [v3.0.3](https://github.com/seuros/capistrano-puma/tree/v3.0.3) (2017-03-23)
|
133
|
+
|
134
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v3.0.2...v3.0.3)
|
135
|
+
|
136
|
+
## [v3.0.2](https://github.com/seuros/capistrano-puma/tree/v3.0.2) (2017-03-22)
|
137
|
+
|
138
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v3.0.1...v3.0.2)
|
139
|
+
|
140
|
+
**Merged pull requests:**
|
141
|
+
|
142
|
+
- Fix vars loading issue during plugin initialization [\#205](https://github.com/seuros/capistrano-puma/pull/205) ([ilyapoz](https://github.com/ilyapoz))
|
143
|
+
|
144
|
+
## [v3.0.1](https://github.com/seuros/capistrano-puma/tree/v3.0.1) (2017-03-20)
|
145
|
+
|
146
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v3.0.0...v3.0.1)
|
147
|
+
|
148
|
+
## [v3.0.0](https://github.com/seuros/capistrano-puma/tree/v3.0.0) (2017-03-18)
|
149
|
+
|
150
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v2.0.0...v3.0.0)
|
151
|
+
|
152
|
+
**Merged pull requests:**
|
153
|
+
|
154
|
+
- Release v3.0.0 candidate [\#201](https://github.com/seuros/capistrano-puma/pull/201) ([seuros](https://github.com/seuros))
|
155
|
+
- Add 'daemonize' config [\#194](https://github.com/seuros/capistrano-puma/pull/194) ([rhannequin](https://github.com/rhannequin))
|
156
|
+
|
157
|
+
## [v2.0.0](https://github.com/seuros/capistrano-puma/tree/v2.0.0) (2017-03-08)
|
158
|
+
|
159
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v1.2.1...v2.0.0)
|
160
|
+
|
161
|
+
**Merged pull requests:**
|
162
|
+
|
163
|
+
- Skip puma start command if puma is running [\#198](https://github.com/seuros/capistrano-puma/pull/198) ([mizukmb](https://github.com/mizukmb))
|
164
|
+
- Fix puma:monit task for first deployment [\#187](https://github.com/seuros/capistrano-puma/pull/187) ([lucasalves](https://github.com/lucasalves))
|
165
|
+
- Update workers.rake [\#186](https://github.com/seuros/capistrano-puma/pull/186) ([treenewbee](https://github.com/treenewbee))
|
166
|
+
- typo [\#178](https://github.com/seuros/capistrano-puma/pull/178) ([BenjaminKim](https://github.com/BenjaminKim))
|
167
|
+
- Modify README file [\#176](https://github.com/seuros/capistrano-puma/pull/176) ([00dav00](https://github.com/00dav00))
|
168
|
+
- Remove trailing lines in ERB files [\#171](https://github.com/seuros/capistrano-puma/pull/171) ([papilip](https://github.com/papilip))
|
169
|
+
- Closing ActiveRecord connections before forking [\#170](https://github.com/seuros/capistrano-puma/pull/170) ([marcoschicote](https://github.com/marcoschicote))
|
170
|
+
- Add support to plugins [\#168](https://github.com/seuros/capistrano-puma/pull/168) ([seuros](https://github.com/seuros))
|
171
|
+
- Add server\_name to the http-\>https redirection server block [\#147](https://github.com/seuros/capistrano-puma/pull/147) ([bdewater](https://github.com/bdewater))
|
172
|
+
- Fix README: default value of puma\_preload\_app is false [\#145](https://github.com/seuros/capistrano-puma/pull/145) ([snoozer05](https://github.com/snoozer05))
|
173
|
+
- Respect the global puma\_user setting [\#139](https://github.com/seuros/capistrano-puma/pull/139) ([jhollinger](https://github.com/jhollinger))
|
174
|
+
- Add puma commands to chruby\_map\_bins. [\#135](https://github.com/seuros/capistrano-puma/pull/135) ([linjunpop](https://github.com/linjunpop))
|
175
|
+
- Run the shell as a login shell. [\#132](https://github.com/seuros/capistrano-puma/pull/132) ([kgiszczak](https://github.com/kgiszczak))
|
176
|
+
- Issue \#120 -- explicitly pass the config file location to pumactl [\#129](https://github.com/seuros/capistrano-puma/pull/129) ([lhagemann](https://github.com/lhagemann))
|
177
|
+
- Use SSHKit command\_map [\#128](https://github.com/seuros/capistrano-puma/pull/128) ([hbin](https://github.com/hbin))
|
178
|
+
- Update Readme [\#127](https://github.com/seuros/capistrano-puma/pull/127) ([h0lyalg0rithm](https://github.com/h0lyalg0rithm))
|
179
|
+
|
180
|
+
## [v1.2.1](https://github.com/seuros/capistrano-puma/tree/v1.2.1) (2015-08-20)
|
181
|
+
|
182
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v1.2.0...v1.2.1)
|
183
|
+
|
184
|
+
**Merged pull requests:**
|
185
|
+
|
186
|
+
- Added fix for wrong arguments on puma stop [\#124](https://github.com/seuros/capistrano-puma/pull/124) ([rsov](https://github.com/rsov))
|
187
|
+
|
188
|
+
## [v1.2.0](https://github.com/seuros/capistrano-puma/tree/v1.2.0) (2015-08-19)
|
189
|
+
|
190
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v1.1.0...v1.2.0)
|
191
|
+
|
192
|
+
**Implemented enhancements:**
|
193
|
+
|
194
|
+
- Adds ssl configuration for nginx [\#116](https://github.com/seuros/capistrano-puma/pull/116) ([mdesanti](https://github.com/mdesanti))
|
195
|
+
|
196
|
+
**Merged pull requests:**
|
197
|
+
|
198
|
+
- new puma user log [\#122](https://github.com/seuros/capistrano-puma/pull/122) ([seuros](https://github.com/seuros))
|
199
|
+
- 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))
|
200
|
+
- Mcb/add support for puma user [\#117](https://github.com/seuros/capistrano-puma/pull/117) ([mcb](https://github.com/mcb))
|
201
|
+
- Fix puma\_monit\_bin [\#114](https://github.com/seuros/capistrano-puma/pull/114) ([msbrigna](https://github.com/msbrigna))
|
202
|
+
- Update monit tasks [\#113](https://github.com/seuros/capistrano-puma/pull/113) ([soylent](https://github.com/soylent))
|
203
|
+
|
204
|
+
## [v1.1.0](https://github.com/seuros/capistrano-puma/tree/v1.1.0) (2015-06-23)
|
205
|
+
|
206
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v1.0.0...v1.1.0)
|
207
|
+
|
208
|
+
**Merged pull requests:**
|
209
|
+
|
210
|
+
- Always refresh Gemfile. Fixes \#109 [\#110](https://github.com/seuros/capistrano-puma/pull/110) ([sime](https://github.com/sime))
|
211
|
+
- Reload Monit after uploading any monit configuration [\#108](https://github.com/seuros/capistrano-puma/pull/108) ([suhailpatel](https://github.com/suhailpatel))
|
212
|
+
- Set :puma\_preload\_app to false [\#104](https://github.com/seuros/capistrano-puma/pull/104) ([rafaelgoulart](https://github.com/rafaelgoulart))
|
213
|
+
|
214
|
+
## [v1.0.0](https://github.com/seuros/capistrano-puma/tree/v1.0.0) (2015-05-05)
|
215
|
+
|
216
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.9.0...v1.0.0)
|
217
|
+
|
218
|
+
**Merged pull requests:**
|
219
|
+
|
220
|
+
- Feature/add activate control app [\#103](https://github.com/seuros/capistrano-puma/pull/103) ([askagirl](https://github.com/askagirl))
|
221
|
+
- Missing 'r' in prune\_bundler [\#101](https://github.com/seuros/capistrano-puma/pull/101) ([sime](https://github.com/sime))
|
222
|
+
|
223
|
+
## [v0.9.0](https://github.com/seuros/capistrano-puma/tree/v0.9.0) (2015-03-20)
|
224
|
+
|
225
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.8.5...v0.9.0)
|
226
|
+
|
227
|
+
**Merged pull requests:**
|
228
|
+
|
229
|
+
- Update Typo in README [\#97](https://github.com/seuros/capistrano-puma/pull/97) ([kcollignon](https://github.com/kcollignon))
|
230
|
+
- bundler prune should be automatically detect [\#96](https://github.com/seuros/capistrano-puma/pull/96) ([crhan](https://github.com/crhan))
|
231
|
+
|
232
|
+
## [v0.8.5](https://github.com/seuros/capistrano-puma/tree/v0.8.5) (2015-01-30)
|
233
|
+
|
234
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.8.4...v0.8.5)
|
235
|
+
|
236
|
+
**Merged pull requests:**
|
237
|
+
|
238
|
+
- Fix smart\_restart task to check if puma preloads app [\#93](https://github.com/seuros/capistrano-puma/pull/93) ([sponomarev](https://github.com/sponomarev))
|
239
|
+
|
240
|
+
## [v0.8.4](https://github.com/seuros/capistrano-puma/tree/v0.8.4) (2015-01-25)
|
241
|
+
|
242
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.8.3...v0.8.4)
|
243
|
+
|
244
|
+
**Merged pull requests:**
|
245
|
+
|
246
|
+
- Allow PATCH method [\#91](https://github.com/seuros/capistrano-puma/pull/91) ([lonre](https://github.com/lonre))
|
247
|
+
- Allow unix:/foo/ socket URLs [\#90](https://github.com/seuros/capistrano-puma/pull/90) ([indirect](https://github.com/indirect))
|
248
|
+
- Fix puma:monit task descriptions [\#88](https://github.com/seuros/capistrano-puma/pull/88) ([jc00ke](https://github.com/jc00ke))
|
249
|
+
- Convert to spaces [\#85](https://github.com/seuros/capistrano-puma/pull/85) ([lonre](https://github.com/lonre))
|
250
|
+
- Minor documentation correction [\#84](https://github.com/seuros/capistrano-puma/pull/84) ([neilbartley](https://github.com/neilbartley))
|
251
|
+
- appending :stage to puma's monit [\#81](https://github.com/seuros/capistrano-puma/pull/81) ([itsNikolay](https://github.com/itsNikolay))
|
252
|
+
|
253
|
+
## [v0.8.3](https://github.com/seuros/capistrano-puma/tree/v0.8.3) (2014-10-28)
|
254
|
+
|
255
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.8.2...v0.8.3)
|
256
|
+
|
257
|
+
## [v0.8.2](https://github.com/seuros/capistrano-puma/tree/v0.8.2) (2014-10-17)
|
258
|
+
|
259
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.8.1...v0.8.2)
|
260
|
+
|
261
|
+
**Merged pull requests:**
|
262
|
+
|
263
|
+
- Start task creates a conf file if none exists. [\#74](https://github.com/seuros/capistrano-puma/pull/74) ([stevemadere](https://github.com/stevemadere))
|
264
|
+
|
265
|
+
## [v0.8.1](https://github.com/seuros/capistrano-puma/tree/v0.8.1) (2014-10-08)
|
266
|
+
|
267
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.8.0...v0.8.1)
|
268
|
+
|
269
|
+
**Merged pull requests:**
|
270
|
+
|
271
|
+
- Fix nginx config task work with roles [\#72](https://github.com/seuros/capistrano-puma/pull/72) ([hnatt](https://github.com/hnatt))
|
272
|
+
- Fix puma\_bind unix socket path [\#70](https://github.com/seuros/capistrano-puma/pull/70) ([hnatt](https://github.com/hnatt))
|
273
|
+
- Update nginx\_config task call example in README [\#69](https://github.com/seuros/capistrano-puma/pull/69) ([hnatt](https://github.com/hnatt))
|
274
|
+
- Added config option for prune\_bundler [\#68](https://github.com/seuros/capistrano-puma/pull/68) ([behe](https://github.com/behe))
|
275
|
+
|
276
|
+
## [v0.8.0](https://github.com/seuros/capistrano-puma/tree/v0.8.0) (2014-09-23)
|
277
|
+
|
278
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.7.0...v0.8.0)
|
279
|
+
|
280
|
+
**Merged pull requests:**
|
281
|
+
|
282
|
+
- Update puma.cap to add missing , [\#65](https://github.com/seuros/capistrano-puma/pull/65) ([bryanl](https://github.com/bryanl))
|
283
|
+
- 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))
|
284
|
+
- Cannot call nginx:config cap task [\#61](https://github.com/seuros/capistrano-puma/pull/61) ([isc](https://github.com/isc))
|
285
|
+
|
286
|
+
## [v0.7.0](https://github.com/seuros/capistrano-puma/tree/v0.7.0) (2014-08-07)
|
287
|
+
|
288
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.6.1...v0.7.0)
|
289
|
+
|
290
|
+
**Merged pull requests:**
|
291
|
+
|
292
|
+
- 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))
|
293
|
+
|
294
|
+
## [v0.6.1](https://github.com/seuros/capistrano-puma/tree/v0.6.1) (2014-07-03)
|
295
|
+
|
296
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/v0.2.0...v0.6.1)
|
297
|
+
|
298
|
+
**Merged pull requests:**
|
299
|
+
|
300
|
+
- Explicitly daemonize when needed. [\#54](https://github.com/seuros/capistrano-puma/pull/54) ([crohr](https://github.com/crohr))
|
301
|
+
- Access and Error logs where backwards [\#52](https://github.com/seuros/capistrano-puma/pull/52) ([rottmanj](https://github.com/rottmanj))
|
302
|
+
- Fix jungle tasks [\#47](https://github.com/seuros/capistrano-puma/pull/47) ([RavWar](https://github.com/RavWar))
|
303
|
+
- Make monit play well with chruby. [\#46](https://github.com/seuros/capistrano-puma/pull/46) ([linjunpop](https://github.com/linjunpop))
|
304
|
+
- fix and beautify puma-deb, closes \#44 [\#45](https://github.com/seuros/capistrano-puma/pull/45) ([masterkain](https://github.com/masterkain))
|
305
|
+
- puma jungle start stop restart fix [\#38](https://github.com/seuros/capistrano-puma/pull/38) ([petertoth](https://github.com/petertoth))
|
306
|
+
- check redhat-release first [\#34](https://github.com/seuros/capistrano-puma/pull/34) ([marshall-lee](https://github.com/marshall-lee))
|
307
|
+
- set rack\_env before command execution [\#29](https://github.com/seuros/capistrano-puma/pull/29) ([arielze](https://github.com/arielze))
|
308
|
+
|
309
|
+
## [v0.2.0](https://github.com/seuros/capistrano-puma/tree/v0.2.0) (2014-01-28)
|
310
|
+
|
311
|
+
[Full Changelog](https://github.com/seuros/capistrano-puma/compare/4068552029ae7f40963afaa6d45d2877c7806d8d...v0.2.0)
|
312
|
+
|
313
|
+
**Merged pull requests:**
|
314
|
+
|
315
|
+
- add a trigger to puma config, for support Issue \#25 [\#26](https://github.com/seuros/capistrano-puma/pull/26) ([crhan](https://github.com/crhan))
|
316
|
+
- bump version for support capistrano v3.1 [\#24](https://github.com/seuros/capistrano-puma/pull/24) ([crhan](https://github.com/crhan))
|
317
|
+
- capistrano v3.1 compatible improve: dependency solve [\#22](https://github.com/seuros/capistrano-puma/pull/22) ([crhan](https://github.com/crhan))
|
318
|
+
- phased-restart also check for pid file first [\#21](https://github.com/seuros/capistrano-puma/pull/21) ([crhan](https://github.com/crhan))
|
319
|
+
- check pid instead of state file [\#20](https://github.com/seuros/capistrano-puma/pull/20) ([crhan](https://github.com/crhan))
|
320
|
+
- fix puma/puma\#300: Gemfile not refreshed between deploys [\#19](https://github.com/seuros/capistrano-puma/pull/19) ([crhan](https://github.com/crhan))
|
321
|
+
- Update README.md [\#17](https://github.com/seuros/capistrano-puma/pull/17) ([James-Hendrickson](https://github.com/James-Hendrickson))
|
322
|
+
- Sane defaults and puma:check [\#15](https://github.com/seuros/capistrano-puma/pull/15) ([shaneog](https://github.com/shaneog))
|
323
|
+
- run puma and pumactl with bundler [\#14](https://github.com/seuros/capistrano-puma/pull/14) ([ayamomiji](https://github.com/ayamomiji))
|
324
|
+
- Ensures that it will bundle w/ capistrano 3.1 [\#6](https://github.com/seuros/capistrano-puma/pull/6) ([kyledecot](https://github.com/kyledecot))
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -20,128 +20,69 @@ And then execute:
|
|
20
20
|
# Capfile
|
21
21
|
|
22
22
|
require 'capistrano/puma'
|
23
|
-
|
24
|
-
|
25
|
-
require 'capistrano/puma/monit' # if you need the monit tasks
|
26
|
-
require 'capistrano/puma/nginx' # if you want to upload a nginx site template
|
23
|
+
install_plugin Capistrano::Puma # Default puma tasks
|
24
|
+
install_plugin Capistrano::Puma::Systemd
|
27
25
|
```
|
28
26
|
|
29
|
-
|
30
|
-
```
|
31
|
-
|
32
|
-
cap puma:config # upload puma config(eg. shared/puma.config)
|
33
|
-
```
|
34
|
-
you may want to customize these two templates locally before uploading
|
35
|
-
```
|
36
|
-
rails g capistrano:nginx_puma:config
|
37
|
-
```
|
27
|
+
To prevent loading the hooks of the plugin, add false to the load_hooks param.
|
28
|
+
```ruby
|
29
|
+
# Capfile
|
38
30
|
|
39
|
-
|
40
|
-
```
|
41
|
-
set :nginx_sites_available_path, "/etc/nginx/sites-available"
|
42
|
-
set :nginx_sites_enabled_path, "/etc/nginx/sites-enabled"
|
31
|
+
install_plugin Capistrano::Puma, load_hooks: false # Default puma tasks without hooks
|
43
32
|
```
|
44
33
|
|
45
|
-
|
34
|
+
To make it work with rvm, rbenv and chruby, install the plugin after corresponding library inclusion.
|
35
|
+
```ruby
|
36
|
+
# Capfile
|
37
|
+
|
38
|
+
require 'capistrano/rbenv'
|
39
|
+
require 'capistrano/puma'
|
40
|
+
install_plugin Capistrano::Puma
|
46
41
|
```
|
47
|
-
|
42
|
+
|
43
|
+
### Config
|
44
|
+
|
45
|
+
Puma configuration is expected to be in `config/puma.rb` or `config/puma/#{fetch(:puma_env)}.rb` and checked in your repository.
|
46
|
+
Uploading the configuration via capistrano was removed as it was causing problems with custom configurations.
|
47
|
+
|
48
|
+
## Example
|
49
|
+
|
50
|
+
A sample application is provided to show how to use this gem at https://github.com/seuros/capistrano-example-app
|
51
|
+
|
52
|
+
### Systemd Socket Activation
|
53
|
+
|
54
|
+
Systemd socket activation starts your app upon first request if it is not already running
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
set :puma_enable_socket_service, true
|
48
58
|
```
|
49
|
-
|
59
|
+
|
60
|
+
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).
|
61
|
+
|
62
|
+
To restart the listening socket using Systemd run
|
50
63
|
```
|
51
|
-
|
64
|
+
cap puma:systemd:restart_socket
|
52
65
|
```
|
66
|
+
This would also restart the puma instance as the puma service depends on the socket service being active
|
67
|
+
|
68
|
+
### Other configs
|
53
69
|
|
54
70
|
Configurable options, shown here with defaults: Please note the configuration options below are not required unless you are trying to override a default setting, for instance if you are deploying on a host on which you do not have sudo or root privileges and you need to restrict the path. These settings go in the deploy.rb file.
|
55
71
|
|
56
72
|
```ruby
|
57
73
|
set :puma_user, fetch(:user)
|
58
|
-
set :
|
59
|
-
set :
|
60
|
-
set :
|
61
|
-
set :puma_bind, "unix://#{shared_path}/tmp/sockets/puma.sock" #accept array for multi-bind
|
62
|
-
set :puma_default_control_app, "unix://#{shared_path}/tmp/sockets/pumactl.sock"
|
63
|
-
set :puma_conf, "#{shared_path}/puma.rb"
|
64
|
-
set :puma_access_log, "#{shared_path}/log/puma_access.log"
|
65
|
-
set :puma_error_log, "#{shared_path}/log/puma_error.log"
|
66
|
-
set :puma_role, :app
|
67
|
-
set :puma_env, fetch(:rack_env, fetch(:rails_env, 'production'))
|
68
|
-
set :puma_threads, [0, 16]
|
69
|
-
set :puma_workers, 0
|
70
|
-
set :puma_worker_timeout, nil
|
71
|
-
set :puma_init_active_record, false
|
72
|
-
set :puma_preload_app, true
|
73
|
-
set :nginx_use_ssl, false
|
74
|
-
```
|
75
|
-
For Jungle tasks (beta), these options exist:
|
76
|
-
```ruby
|
77
|
-
set :puma_jungle_conf, '/etc/puma.conf'
|
78
|
-
set :puma_run_path, '/usr/local/bin/run-puma'
|
74
|
+
set :puma_role, :web
|
75
|
+
set :puma_service_unit_env_files, []
|
76
|
+
set :puma_service_unit_env_vars, []
|
79
77
|
```
|
80
78
|
|
81
|
-
|
82
|
-
```ruby
|
83
|
-
set :puma_bind, %w(tcp://0.0.0.0:9292 unix:///tmp/puma.sock)
|
84
|
-
```
|
85
|
-
* Listening on tcp://0.0.0.0:9220
|
86
|
-
* Listening on unix:///tmp/puma.sock
|
87
|
-
|
88
|
-
|
89
|
-
For ActiveRecord the following line to your deploy.rb
|
79
|
+
__Notes:__ If you are setting values for variables that might be used by other plugins, use `append` instead of `set`. For example:
|
90
80
|
```ruby
|
91
|
-
|
81
|
+
append :rbenv_map_bins, 'puma', 'pumactl'
|
92
82
|
```
|
93
83
|
|
94
|
-
|
95
|
-
|
96
|
-
tmp/pids tmp/sockets log
|
97
|
-
|
98
|
-
## Changelog
|
99
|
-
- 1.2.0: add support for puma user for puma user @mcb & @seuros
|
100
|
-
- 1.1.0: Set :puma_preload_app to false; Reload Monit after uploading any monit configuration; Always refresh Gemfile @rafaelgoulart @suhailpatel @sime
|
101
|
-
- 1.0.0: Add activate control app @askagirl
|
102
|
-
- 0.8.5: Fix smart_restart task to check if puma preloads app
|
103
|
-
- 0.8.4: Allow patch method (Nginx template) @lonre
|
104
|
-
- 0.8.2: Start task creates a conf file if none exists @stevemadere
|
105
|
-
- 0.8.1: Fixed nginx task @hnatt, support for prune_bundler @behe
|
106
|
-
- 0.8.0: Some changes
|
107
|
-
- 0.7.0: added Nginx template generator @dfang
|
108
|
-
- 0.6.1: added :puma_default_hooks, you can turn off the automatic hooks by setting it false
|
109
|
-
- 0.6.0: Remove `daemonize true` from default puma.rb file. Explicitly pass `--daemon` flag when needed.
|
110
|
-
- 0.5.1: Added worker_timeout option
|
111
|
-
- 0.5.0: Bugs fixes
|
112
|
-
- 0.4.2: Fix monit template to support chruby
|
113
|
-
- 0.4.1: Fix puma jungle (debian)
|
114
|
-
- 0.4.0: Multi-bind support
|
115
|
-
- 0.3.7: Dependency bug fix
|
116
|
-
- 0.3.5: Fixed a prehistoric bug
|
117
|
-
- 0.3.4: I don't remember what i did here
|
118
|
-
- 0.3.3: Puma jungle start fix
|
119
|
-
- 0.3.2: Tag option support (require puma 2.8.2+)
|
120
|
-
- 0.3.1: Typo fix
|
121
|
-
- 0.3.0: Initial support for puma signals
|
122
|
-
- 0.2.2: Application pre-loading is optional now (set puma_preload_app to false to turn it off)
|
123
|
-
- 0.2.1: Tasks are run within rack context
|
124
|
-
- 0.2.0: Support for puma `ActiveRecord::Base.establish_connection` on
|
125
|
-
boot
|
126
|
-
- 0.1.3: Capistrano 3.1 support
|
127
|
-
- 0.1.2: Gemfile are refreshed between deploys now
|
128
|
-
- 0.1.1: Initial support for Monit and configuration override added.
|
129
|
-
- 0.1.0: Phased restart will be used if puma is in cluster mode
|
130
|
-
- 0.0.9: puma.rb location changed to shared_path root. puma:check moved to after deploy:check
|
131
|
-
- 0.0.8: puma.rb is automatically generated if not present. Fixed RVM issue.
|
132
|
-
- 0.0.7: Gem pushed to rubygems as capistrano3-puma. Support of Redhat based OS for Jungle init script.
|
133
|
-
|
134
|
-
|
135
|
-
## Contributors
|
136
|
-
|
137
|
-
- [Ruohan Chen](https://github.com/crhan)
|
138
|
-
- [molfar](https://github.com/molfar)
|
139
|
-
- [ayaya](https://github.com/ayamomiji)
|
140
|
-
- [Shane O'Grady](https://github.com/shaneog)
|
141
|
-
- [Jun Lin](https://github.com/linjunpop)
|
142
|
-
- [fang duan](https://github.com/dfang)
|
143
|
-
- [Steve Madere](https://github.com/stevemadere)
|
144
|
-
- [Matias De Santi](https://github.com/mdesanti)
|
84
|
+
# Nginx documentation
|
85
|
+
Nginx documentation was moved to [nginx.md](docs/nginx.md)
|
145
86
|
|
146
87
|
## Contributing
|
147
88
|
|
@@ -1 +1,22 @@
|
|
1
|
-
|
1
|
+
module Capistrano
|
2
|
+
class Puma::Nginx < Capistrano::Plugin
|
3
|
+
include PumaCommon
|
4
|
+
def set_defaults
|
5
|
+
# Nginx and puma configuration
|
6
|
+
set_if_empty :nginx_config_name, -> { "#{fetch(:application)}_#{fetch(:stage)}" }
|
7
|
+
set_if_empty :nginx_sites_available_path, '/etc/nginx/sites-available'
|
8
|
+
set_if_empty :nginx_sites_enabled_path, '/etc/nginx/sites-enabled'
|
9
|
+
set_if_empty :nginx_server_name, -> { "localhost #{fetch(:application)}.local" }
|
10
|
+
set_if_empty :nginx_flags, 'fail_timeout=0'
|
11
|
+
set_if_empty :nginx_http_flags, fetch(:nginx_flags)
|
12
|
+
set_if_empty :nginx_socket_flags, fetch(:nginx_flags)
|
13
|
+
set_if_empty :nginx_use_ssl, false
|
14
|
+
set_if_empty :nginx_use_http2, true
|
15
|
+
set_if_empty :nginx_downstream_uses_ssl, false
|
16
|
+
end
|
17
|
+
|
18
|
+
def define_tasks
|
19
|
+
eval_rakefile File.expand_path('../../tasks/nginx.rake', __FILE__)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
module Capistrano
|
2
|
+
class Puma::Systemd < Capistrano::Plugin
|
3
|
+
include PumaCommon
|
4
|
+
|
5
|
+
def register_hooks
|
6
|
+
after 'deploy:finished', 'puma:smart_restart'
|
7
|
+
end
|
8
|
+
|
9
|
+
def define_tasks
|
10
|
+
eval_rakefile File.expand_path('../../tasks/systemd.rake', __FILE__)
|
11
|
+
end
|
12
|
+
|
13
|
+
def set_defaults
|
14
|
+
set_if_empty :puma_systemctl_bin, -> { fetch(:systemctl_bin, '/bin/systemctl') }
|
15
|
+
set_if_empty :puma_service_unit_name, -> { "#{fetch(:application)}_puma_#{fetch(:stage)}" }
|
16
|
+
set_if_empty :puma_enable_socket_service, false
|
17
|
+
|
18
|
+
set_if_empty :puma_service_unit_env_files, -> { fetch(:service_unit_env_files, []) }
|
19
|
+
set_if_empty :puma_service_unit_env_vars, -> { fetch(:service_unit_env_vars, []) }
|
20
|
+
|
21
|
+
set_if_empty :puma_systemctl_user, -> { fetch(:systemctl_user, :user) }
|
22
|
+
set_if_empty :puma_enable_lingering, -> { fetch(:puma_systemctl_user) != :system }
|
23
|
+
set_if_empty :puma_lingering_user, -> { fetch(:lingering_user, fetch(:user)) }
|
24
|
+
|
25
|
+
set_if_empty :puma_service_templates_path, fetch(:service_templates_path, 'config/deploy/templates')
|
26
|
+
end
|
27
|
+
|
28
|
+
def expanded_bundle_command
|
29
|
+
backend.capture(:echo, SSHKit.config.command_map[:bundle]).strip
|
30
|
+
end
|
31
|
+
|
32
|
+
def fetch_systemd_unit_path
|
33
|
+
if fetch(:puma_systemctl_user) == :system
|
34
|
+
"/etc/systemd/system/"
|
35
|
+
else
|
36
|
+
home_dir = backend.capture :pwd
|
37
|
+
File.join(home_dir, ".config", "systemd", "user")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def systemd_command(*args)
|
42
|
+
command = [fetch(:puma_systemctl_bin)]
|
43
|
+
|
44
|
+
unless fetch(:puma_systemctl_user) == :system
|
45
|
+
command << "--user"
|
46
|
+
end
|
47
|
+
|
48
|
+
command + args
|
49
|
+
end
|
50
|
+
|
51
|
+
def sudo_if_needed(*command)
|
52
|
+
if fetch(:puma_systemctl_user) == :system
|
53
|
+
backend.sudo command.map(&:to_s).join(" ")
|
54
|
+
else
|
55
|
+
backend.execute(*command)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def execute_systemd(*args)
|
60
|
+
sudo_if_needed(*systemd_command(*args))
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|