capistrano3-puma 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -2
- data/lib/capistrano/puma/version.rb +1 -1
- data/lib/capistrano/tasks/nginx.cap +7 -0
- data/lib/capistrano/tasks/puma.cap +2 -2
- data/lib/capistrano/templates/puma.rb.erb +3 -4
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ea350fc3a6710ad4d8c993d22ba678de9f257b4
|
4
|
+
data.tar.gz: 11a6d44358efac4a923d7d085f9ab2d902a0356e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da870baec198029a8918416162ffc2ad8a4eadd73a16a50075f6c9f05d81d70b95241ffbb22862d5a62a6c408a21b2e7ae6244a5b7b6a076e8b2c9ce13fba76a
|
7
|
+
data.tar.gz: 8c7b71aaa0ef4a25b369880172c9f018d9991f8fb9bebfb0d87711b3e5f01780e88ac93775dfebd00a3d7beab6139797d0498a47f593b118b89c29813fc8f759
|
data/README.md
CHANGED
@@ -27,10 +27,10 @@ And then execute:
|
|
27
27
|
|
28
28
|
then you can use ```cap -vT``` to list tasks
|
29
29
|
```
|
30
|
-
cap
|
30
|
+
cap puma:nginx_config # upload a nginx site config(eg. /etc/nginx/site-enabled/)
|
31
31
|
cap puma:config # upload puma config(eg. shared/puma.config)
|
32
32
|
```
|
33
|
-
you may want to customize these two templates
|
33
|
+
you may want to customize these two templates locally before uploading
|
34
34
|
```
|
35
35
|
rails g capistrano:nginx_puma:config
|
36
36
|
```
|
@@ -41,6 +41,15 @@ set :nginx_sites_available_path, "/etc/nginx/sites-available"
|
|
41
41
|
set :nginx_sites_enabled_path, "/etc/nginx/sites-enabled"
|
42
42
|
```
|
43
43
|
|
44
|
+
By default, ```nginx_config``` will be executed with ```:web``` role. But you can assign it to a different role:
|
45
|
+
```
|
46
|
+
set :puma_nginx, :foo
|
47
|
+
```
|
48
|
+
or define a standalone one:
|
49
|
+
```
|
50
|
+
role :puma_nginx, %w{root@example.com}
|
51
|
+
```
|
52
|
+
|
44
53
|
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.
|
45
54
|
|
46
55
|
```ruby
|
@@ -58,6 +67,7 @@ Configurable options, shown here with defaults: Please note the configuration op
|
|
58
67
|
set :puma_worker_timeout, nil
|
59
68
|
set :puma_init_active_record, false
|
60
69
|
set :puma_preload_app, true
|
70
|
+
set :puma_prune_bundler, false
|
61
71
|
```
|
62
72
|
For Jungle tasks (beta), these options exist:
|
63
73
|
```ruby
|
@@ -83,6 +93,8 @@ Ensure that the following directories are shared (via ``linked_dirs``):
|
|
83
93
|
tmp/pids tmp/sockets log
|
84
94
|
|
85
95
|
## Changelog
|
96
|
+
- 0.8.1: Fixed nginx task @hnatt, support for prune_bundler @behe
|
97
|
+
- 0.8.0: Some changes
|
86
98
|
- 0.7.0: added Nginx template generator @dfang
|
87
99
|
- 0.6.1: added :puma_default_hooks, you can turn off the automatic hooks by setting it false
|
88
100
|
- 0.6.0: Remove `daemonize true` from default puma.rb file. Explicitly pass `--daemon` flag when needed.
|
@@ -1,6 +1,13 @@
|
|
1
|
+
namespace :load do
|
2
|
+
task :defaults do
|
3
|
+
set :puma_nginx, :web
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
1
7
|
namespace :puma do
|
2
8
|
desc "Setup nginx configuration"
|
3
9
|
task :nginx_config do
|
10
|
+
fail ":puma_nginx role not set!" if roles(:puma_nginx).empty?
|
4
11
|
on roles(:puma_nginx) do |role|
|
5
12
|
template_puma("nginx_conf", "/tmp/nginx_#{fetch(:nginx_config_name)}", role)
|
6
13
|
sudo :mv, "/tmp/nginx_#{fetch(:nginx_config_name)} #{fetch(:nginx_sites_available_path)}/#{fetch(:nginx_config_name)}"
|
@@ -2,7 +2,6 @@ namespace :load do
|
|
2
2
|
task :defaults do
|
3
3
|
set :puma_default_hooks, -> { true }
|
4
4
|
set :puma_role, :app
|
5
|
-
set :puma_nginx_role, :web
|
6
5
|
set :puma_env, -> { fetch(:rack_env, fetch(:rails_env, fetch(:stage))) }
|
7
6
|
# Configure "min" to be the minimum number of threads to use to answer
|
8
7
|
# requests and "max" the maximum.
|
@@ -11,12 +10,13 @@ namespace :load do
|
|
11
10
|
set :puma_rackup, -> { File.join(current_path, 'config.ru') }
|
12
11
|
set :puma_state, -> { File.join(shared_path, 'tmp', 'pids', 'puma.state') }
|
13
12
|
set :puma_pid, -> { File.join(shared_path, 'tmp', 'pids', 'puma.pid') }
|
14
|
-
set :puma_bind, -> { File.join(
|
13
|
+
set :puma_bind, -> { File.join("unix://#{shared_path}", 'tmp', 'sockets', 'puma.sock') }
|
15
14
|
set :puma_conf, -> { File.join(shared_path, 'puma.rb') }
|
16
15
|
set :puma_access_log, -> { File.join(shared_path, 'log', 'puma_access.log') }
|
17
16
|
set :puma_error_log, -> { File.join(shared_path, 'log', 'puma_error.log') }
|
18
17
|
set :puma_init_active_record, false
|
19
18
|
set :puma_preload_app, true
|
19
|
+
set :puma_prune_bundler, false
|
20
20
|
|
21
21
|
# Rbenv and RVM integration
|
22
22
|
set :rbenv_map_bins, fetch(:rbenv_map_bins).to_a.concat(%w{ puma pumactl })
|
@@ -23,10 +23,9 @@ worker_timeout <%= fetch(:puma_worker_timeout).to_i %>
|
|
23
23
|
preload_app!
|
24
24
|
<% end %>
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
26
|
+
<% if fetch(:puma_prune_bundler) %>
|
27
|
+
prune_bundler
|
28
|
+
<% end %>
|
30
29
|
|
31
30
|
<% if fetch(:puma_init_active_record) %>
|
32
31
|
on_worker_boot 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: 0.8.
|
4
|
+
version: 0.8.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: 2014-
|
11
|
+
date: 2014-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -93,8 +93,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
95
|
rubyforge_project:
|
96
|
-
rubygems_version: 2.
|
96
|
+
rubygems_version: 2.4.1
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: Puma integration for Capistrano
|
100
100
|
test_files: []
|
101
|
+
has_rdoc:
|