pixelforce_recipes 2.1 → 3.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 +4 -4
- data/Gemfile.lock +10 -10
- data/lib/pixelforce_recipes/capistrano_3_recipes/puma.rb +21 -41
- data/lib/pixelforce_recipes/capistrano_3_recipes/sidekiq.rb +20 -59
- data/lib/pixelforce_recipes/templates/nginx_puma_config.erb +9 -5
- data/lib/pixelforce_recipes/templates/puma_systemd.erb +19 -0
- data/lib/pixelforce_recipes/templates/sidekiq_systemd.erb +17 -0
- data/lib/pixelforce_recipes/version.rb +1 -1
- data/pixelforce_recipes.gemspec +2 -2
- metadata +17 -17
- data/lib/pixelforce_recipes/templates/puma_init.erb +0 -55
- data/lib/pixelforce_recipes/templates/puma_supervisor.erb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 809a2b8862b0adff2ce486e96642f1308079de150fdf0eaa3fa9cc016aae767c
|
4
|
+
data.tar.gz: 8b478f7e2520314e3086adb91bf78eea3c447814e56b1b5da2c7d84044a2654c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d7764428c42ca3e3aa39f7e36e42e281a41001eea6e49ca2fb10f8577e4619ee7242485164f05213ba2ccdfab237c58f54a84a7578dfe4a13517797aba2ea68
|
7
|
+
data.tar.gz: 5b979f63ef29dca296f360d6a3f3017d78be93fbb574c510184d8694b13cf1bccaab761da55ce83c486983a8032c273b4123c45c0d7c093475ac2120af0590f5
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pixelforce_recipes (1
|
4
|
+
pixelforce_recipes (3.1)
|
5
|
+
bundler (>= 2.2.10)
|
5
6
|
capistrano (> 2.0.0)
|
6
7
|
|
7
8
|
GEM
|
@@ -9,18 +10,18 @@ GEM
|
|
9
10
|
specs:
|
10
11
|
airbrussh (1.4.0)
|
11
12
|
sshkit (>= 1.6.1, != 1.7.0)
|
12
|
-
capistrano (3.
|
13
|
+
capistrano (3.16.0)
|
13
14
|
airbrussh (>= 1.0.0)
|
14
15
|
i18n
|
15
16
|
rake (>= 10.0.0)
|
16
17
|
sshkit (>= 1.9.0)
|
17
|
-
concurrent-ruby (1.1.
|
18
|
+
concurrent-ruby (1.1.9)
|
18
19
|
diff-lcs (1.2.5)
|
19
|
-
i18n (1.8.
|
20
|
+
i18n (1.8.11)
|
20
21
|
concurrent-ruby (~> 1.0)
|
21
|
-
net-scp (
|
22
|
-
net-ssh (>= 2.6.5, <
|
23
|
-
net-ssh (
|
22
|
+
net-scp (3.0.0)
|
23
|
+
net-ssh (>= 2.6.5, < 7.0.0)
|
24
|
+
net-ssh (6.1.0)
|
24
25
|
rake (13.0.1)
|
25
26
|
rspec (3.5.0)
|
26
27
|
rspec-core (~> 3.5.0)
|
@@ -35,7 +36,7 @@ GEM
|
|
35
36
|
diff-lcs (>= 1.2.0, < 2.0)
|
36
37
|
rspec-support (~> 3.5.0)
|
37
38
|
rspec-support (3.5.0)
|
38
|
-
sshkit (1.
|
39
|
+
sshkit (1.21.2)
|
39
40
|
net-scp (>= 1.1.2)
|
40
41
|
net-ssh (>= 2.8.0)
|
41
42
|
|
@@ -43,10 +44,9 @@ PLATFORMS
|
|
43
44
|
ruby
|
44
45
|
|
45
46
|
DEPENDENCIES
|
46
|
-
bundler (~> 1.12)
|
47
47
|
pixelforce_recipes!
|
48
48
|
rake (~> 13.0)
|
49
49
|
rspec (~> 3.0)
|
50
50
|
|
51
51
|
BUNDLED WITH
|
52
|
-
|
52
|
+
2.2.10
|
@@ -1,63 +1,43 @@
|
|
1
1
|
namespace :puma do
|
2
|
-
|
3
|
-
desc "Setup puma configuration for this application"
|
2
|
+
desc 'Setup puma configuration for this application'
|
4
3
|
task :config do
|
5
4
|
on roles(:web) do
|
6
|
-
template
|
5
|
+
template 'puma.rb.erb', '/tmp/puma_conf'
|
7
6
|
sudo "mv /tmp/puma_conf #{shared_path}/config/puma.rb"
|
7
|
+
execute "mkdir -p #{shared_path}/pids"
|
8
8
|
end
|
9
9
|
end
|
10
|
-
namespace :sysvinit do
|
11
|
-
task :setup do
|
12
|
-
on roles(:web) do
|
13
|
-
template "puma_init.erb", "/tmp/puma"
|
14
|
-
sudo "mv /tmp/puma /etc/init.d/#{fetch(:application)}"
|
15
|
-
sudo "chmod +x /etc/init.d/#{fetch(:application)}"
|
16
|
-
sudo "update-rc.d #{fetch(:application)} defaults"
|
17
|
-
template "nginx_puma_config.erb", "/tmp/nginx_puma_config"
|
18
|
-
sudo "mv /tmp/nginx_puma_config /etc/nginx/sites-enabled/#{fetch(:application)}"
|
19
|
-
end
|
20
|
-
end
|
21
10
|
|
22
|
-
|
23
|
-
desc "#{command} puma"
|
24
|
-
task command do
|
25
|
-
on roles(:web) do
|
26
|
-
execute "/etc/init.d/#{fetch(:application)} #{command}"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
namespace :supervisor do
|
11
|
+
namespace :systemd do
|
32
12
|
task :setup do
|
33
13
|
on roles(:web) do
|
34
|
-
template
|
35
|
-
sudo
|
36
|
-
sudo
|
37
|
-
sudo
|
38
|
-
|
39
|
-
sudo "mv /tmp/nginx_puma_config /etc/nginx/sites-enabled/#{fetch(:application)}"
|
14
|
+
template 'puma_systemd.erb', '/tmp/puma.service'
|
15
|
+
sudo 'mv /tmp/puma.service /etc/systemd/system/puma.service'
|
16
|
+
sudo 'systemctl daemon-reload'
|
17
|
+
sudo 'systemctl enable puma.service'
|
18
|
+
sudo 'systemctl start puma.service'
|
40
19
|
end
|
41
20
|
end
|
42
21
|
|
43
|
-
task :
|
44
|
-
on roles(:web) do
|
45
|
-
execute "supervisorctl start #{fetch(:application)}"
|
46
|
-
end
|
47
|
-
end
|
48
|
-
task :stop do
|
22
|
+
task :restart do
|
49
23
|
on roles(:web) do
|
50
|
-
|
24
|
+
sudo 'systemctl restart puma'
|
51
25
|
end
|
52
26
|
end
|
53
|
-
|
27
|
+
|
28
|
+
task :reload do
|
54
29
|
on roles(:web) do
|
55
|
-
|
30
|
+
sudo 'systemctl reload puma'
|
56
31
|
end
|
57
32
|
end
|
58
|
-
|
33
|
+
end
|
34
|
+
|
35
|
+
namespace :supervisor do
|
36
|
+
task :uninstall do
|
59
37
|
on roles(:web) do
|
60
|
-
|
38
|
+
sudo "rm /etc/supervisor/conf.d/#{fetch(:application)}.conf"
|
39
|
+
sudo 'supervisorctl reread'
|
40
|
+
sudo 'supervisorctl update'
|
61
41
|
end
|
62
42
|
end
|
63
43
|
end
|
@@ -1,75 +1,36 @@
|
|
1
1
|
namespace :sidekiq do
|
2
|
-
desc
|
2
|
+
desc 'Install sidekiq'
|
3
3
|
|
4
|
-
|
5
|
-
namespace :sysvinit do
|
4
|
+
namespace :systemd do
|
6
5
|
task :setup do
|
7
|
-
on roles(:
|
8
|
-
template
|
9
|
-
sudo
|
10
|
-
sudo
|
11
|
-
sudo
|
12
|
-
|
13
|
-
end
|
14
|
-
|
15
|
-
%w[start stop restart].each do |command|
|
16
|
-
desc "#{command} sidekiq"
|
17
|
-
task command do
|
18
|
-
on roles(:sidekiq) do
|
19
|
-
execute "/etc/init.d/sidekiq #{command}"
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
namespace :supervisor do
|
25
|
-
task :setup do
|
26
|
-
on roles(:sidekiq) do
|
27
|
-
template "sidekiq_supervisor.erb", "/tmp/sidekiq"
|
28
|
-
sudo "mv /tmp/sidekiq /etc/supervisor/conf.d/sidekiq.conf"
|
29
|
-
sudo "supervisorctl reread"
|
30
|
-
sudo "supervisorctl update" # it will auto start the application
|
6
|
+
on roles(:web) do
|
7
|
+
template 'sidekiq_systemd.erb', '/tmp/sidekiq.service'
|
8
|
+
sudo 'mv /tmp/sidekiq.service /etc/systemd/system/sidekiq.service'
|
9
|
+
sudo 'systemctl daemon-reload'
|
10
|
+
sudo 'systemctl enable sidekiq'
|
11
|
+
sudo 'systemctl start sidekiq'
|
31
12
|
end
|
32
13
|
end
|
33
14
|
|
34
|
-
%w[start stop restart].each do |command|
|
35
|
-
desc "#{command} sidekiq"
|
36
|
-
task command do
|
37
|
-
on roles(:sidekiq) do
|
38
|
-
execute "supervisorctl #{command} sidekiq"
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
15
|
task :unload do
|
43
|
-
|
44
|
-
|
45
|
-
execute "supervisorctl signal TSTP sidekiq"
|
46
|
-
end
|
47
|
-
end
|
48
|
-
task :rolling_restart do
|
49
|
-
desc "used for rolling restart, only available on enterprise version"
|
50
|
-
on roles(:sidekiq) do
|
51
|
-
execute "supervisorctl signal USR2 sidekiq"
|
16
|
+
on roles(:web) do
|
17
|
+
sudo 'systemctl kill -s TSTP sidekiq'
|
52
18
|
end
|
53
19
|
end
|
54
20
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
on roles(:sidekiq) do
|
59
|
-
execute "supervisorctl #{command.split('_')[0]} sidekiq:*"
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
task :unload_group do
|
64
|
-
desc "tell sidekiq stop receive new jobs, called at the beginning"
|
65
|
-
on roles(:sidekiq) do
|
66
|
-
execute "supervisorctl signal TSTP sidekiq:*"
|
21
|
+
task :restart do
|
22
|
+
on roles(:web) do
|
23
|
+
sudo 'systemctl restart sidekiq'
|
67
24
|
end
|
68
25
|
end
|
69
|
-
|
70
|
-
|
26
|
+
end
|
27
|
+
|
28
|
+
namespace :supervisor do
|
29
|
+
task :uninstall do
|
71
30
|
on roles(:sidekiq) do
|
72
|
-
|
31
|
+
sudo 'rm/etc/supervisor/conf.d/sidekiq.conf'
|
32
|
+
sudo 'supervisorctl reread'
|
33
|
+
sudo 'supervisorctl update'
|
73
34
|
end
|
74
35
|
end
|
75
36
|
end
|
@@ -8,7 +8,7 @@ server {
|
|
8
8
|
|
9
9
|
root <%= fetch(:deploy_to) %>/current/public;
|
10
10
|
|
11
|
-
location ^~ /
|
11
|
+
location ^~ /packs/ {
|
12
12
|
gzip_static on;
|
13
13
|
expires max;
|
14
14
|
add_header Cache-Control public;
|
@@ -16,12 +16,16 @@ server {
|
|
16
16
|
|
17
17
|
try_files $uri $uri @<%= fetch(:application) %>;
|
18
18
|
location @<%= fetch(:application) %> {
|
19
|
-
proxy_set_header X-Forwarded-Proto
|
19
|
+
proxy_set_header X-Forwarded-Proto https;
|
20
|
+
proxy_set_header X-Url-Scheme https;
|
21
|
+
proxy_set_header X-Forwarded-Ssl on;
|
22
|
+
proxy_set_header Front-End-Https on;
|
23
|
+
|
20
24
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
21
25
|
proxy_set_header Host $http_host;
|
22
|
-
proxy_redirect
|
23
|
-
proxy_buffering
|
24
|
-
proxy_set_header
|
26
|
+
proxy_redirect off;
|
27
|
+
proxy_buffering on;
|
28
|
+
proxy_set_header X-Real-IP $remote_addr;
|
25
29
|
|
26
30
|
proxy_pass http://<%= fetch(:application) %>;
|
27
31
|
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
[Unit]
|
2
|
+
Description=Puma HTTP Server
|
3
|
+
After=network.target
|
4
|
+
|
5
|
+
[Service]
|
6
|
+
Type=simple
|
7
|
+
User=<%= fetch(:user) %>
|
8
|
+
WorkingDirectory=<%= fetch(:deploy_to) %>/current
|
9
|
+
|
10
|
+
# Helpful for debugging socket activation, etc.
|
11
|
+
# Environment=PUMA_DEBUG=1
|
12
|
+
|
13
|
+
ExecStart=/bin/bash -l -c 'bundle exec puma -C <%= fetch(:deploy_to) %>/shared/config/puma.rb -e <%= fetch(:rails_env) %>'
|
14
|
+
ExecStop=/bin/bash -l -c 'bundle exec pumactl -F <%= fetch(:deploy_to) %>/shared/config/puma.rb stop'
|
15
|
+
ExecReload=/bin/bash -l -c 'bundle exec pumactl -F <%= fetch(:deploy_to) %>/shared/config/puma.rb phased-restart'
|
16
|
+
Restart=always
|
17
|
+
|
18
|
+
[Install]
|
19
|
+
WantedBy=multi-user.target
|
@@ -0,0 +1,17 @@
|
|
1
|
+
[Unit]
|
2
|
+
Description=Sidekiq Background Process
|
3
|
+
After=syslog.target network.target
|
4
|
+
|
5
|
+
[Service]
|
6
|
+
Type=simple
|
7
|
+
User=<%= fetch(:user) %>
|
8
|
+
WorkingDirectory=<%= fetch(:deploy_to) %>/current
|
9
|
+
|
10
|
+
# Helpful for debugging socket activation, etc.
|
11
|
+
Environment=MALLOC_ARENA_MAX=2
|
12
|
+
|
13
|
+
ExecStart=/bin/bash -l -c 'bundle exec sidekiq -L <%= fetch(:deploy_to) %>/shared/log/sidekiq.log -e <%= fetch(:rails_env) %>'
|
14
|
+
Restart=always
|
15
|
+
|
16
|
+
[Install]
|
17
|
+
WantedBy=multi-user.target
|
data/pixelforce_recipes.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = %q{Write a short summary, because Rubygems requires one.}
|
13
13
|
spec.description = %q{Write a longer description or delete this line.}
|
14
|
-
spec.homepage = "https://
|
14
|
+
spec.homepage = "https://github.com/BenZhang/pixelforce_recipes"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.add_development_dependency "bundler", "~> 1.12"
|
23
22
|
spec.add_development_dependency "rake", "~> 13.0"
|
24
23
|
spec.add_development_dependency "rspec", "~> 3.0"
|
24
|
+
spec.add_dependency "bundler", ">= 2.2.10"
|
25
25
|
spec.add_dependency(%q<capistrano>, ["> 2.0.0"])
|
26
26
|
end
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pixelforce_recipes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '3.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Zhang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '13.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '13.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '3.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
48
|
-
type: :
|
47
|
+
version: 2.2.10
|
48
|
+
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 2.2.10
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: capistrano
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,20 +102,20 @@ files:
|
|
102
102
|
- lib/pixelforce_recipes/templates/nginx_config.erb
|
103
103
|
- lib/pixelforce_recipes/templates/nginx_puma_config.erb
|
104
104
|
- lib/pixelforce_recipes/templates/puma.rb.erb
|
105
|
-
- lib/pixelforce_recipes/templates/
|
106
|
-
- lib/pixelforce_recipes/templates/puma_supervisor.erb
|
105
|
+
- lib/pixelforce_recipes/templates/puma_systemd.erb
|
107
106
|
- lib/pixelforce_recipes/templates/resque_init.erb
|
108
107
|
- lib/pixelforce_recipes/templates/resque_scheduler_init.erb
|
109
108
|
- lib/pixelforce_recipes/templates/resque_scheduler_supervisor.erb
|
110
109
|
- lib/pixelforce_recipes/templates/resque_supervisor.erb
|
111
110
|
- lib/pixelforce_recipes/templates/sidekiq_init.erb
|
112
111
|
- lib/pixelforce_recipes/templates/sidekiq_supervisor.erb
|
112
|
+
- lib/pixelforce_recipes/templates/sidekiq_systemd.erb
|
113
113
|
- lib/pixelforce_recipes/templates/supervisor.erb
|
114
114
|
- lib/pixelforce_recipes/templates/unicorn_init.erb
|
115
115
|
- lib/pixelforce_recipes/templates/unicorn_supervisor.erb
|
116
116
|
- lib/pixelforce_recipes/version.rb
|
117
117
|
- pixelforce_recipes.gemspec
|
118
|
-
homepage: https://
|
118
|
+
homepage: https://github.com/BenZhang/pixelforce_recipes
|
119
119
|
licenses:
|
120
120
|
- MIT
|
121
121
|
metadata: {}
|
@@ -1,55 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
### BEGIN INIT INFO
|
4
|
-
# Provides: <%= fetch(:application) %>
|
5
|
-
# Required-Start: $local_fs $remote_fs $network $syslog
|
6
|
-
# Required-Stop: $local_fs $remote_fs $network $syslog
|
7
|
-
# Default-Start: 2 3 4 5
|
8
|
-
# Default-Stop: 0 1 6
|
9
|
-
# Short-Description: starts the puma web server
|
10
|
-
# Description: starts puma
|
11
|
-
### END INIT INFO
|
12
|
-
|
13
|
-
USER="<%= fetch(:user) %>"
|
14
|
-
DAEMON=puma
|
15
|
-
PROJECT_PATH="<%= fetch(:deploy_to) %>"
|
16
|
-
DAEMON_OPTS="-C $PROJECT_PATH/shared/config/puma.rb -e <%= fetch(:rails_env) %> -d"
|
17
|
-
NAME=puma
|
18
|
-
DESC="puma app for $USER"
|
19
|
-
PID="$PROJECT_PATH/shared/pids/puma.pid"
|
20
|
-
|
21
|
-
case "$1" in
|
22
|
-
start)
|
23
|
-
CD_TO_APP_DIR="cd $PROJECT_PATH/current"
|
24
|
-
START_DAEMON_PROCESS="bundle exec $DAEMON $DAEMON_OPTS"
|
25
|
-
|
26
|
-
echo -n "Starting $DESC: "
|
27
|
-
if [ `whoami` = 'root' ]; then
|
28
|
-
su - $USER -c "$CD_TO_APP_DIR > /dev/null 2>&1 && $START_DAEMON_PROCESS"
|
29
|
-
else
|
30
|
-
$CD_TO_APP_DIR > /dev/null 2>&1 && $START_DAEMON_PROCESS
|
31
|
-
fi
|
32
|
-
echo "$NAME."
|
33
|
-
;;
|
34
|
-
stop)
|
35
|
-
echo -n "Stopping $DESC: "
|
36
|
-
kill -INT `cat $PID`
|
37
|
-
echo "$NAME."
|
38
|
-
;;
|
39
|
-
restart)
|
40
|
-
echo -n "Restarting $DESC: "
|
41
|
-
kill -USR1 `cat $PID`
|
42
|
-
echo "$NAME."
|
43
|
-
;;
|
44
|
-
reload)
|
45
|
-
echo -n "Reloading $DESC configuration: "
|
46
|
-
kill -USR2 `cat $PID`
|
47
|
-
echo "$NAME."
|
48
|
-
;;
|
49
|
-
*)
|
50
|
-
echo "Usage: $NAME {start|stop|restart|reload}" >&2
|
51
|
-
exit 1
|
52
|
-
;;
|
53
|
-
esac
|
54
|
-
|
55
|
-
exit 0
|
@@ -1,13 +0,0 @@
|
|
1
|
-
[program:<%= fetch(:application) %>]
|
2
|
-
user=<%= fetch(:user) %>
|
3
|
-
environment=HOME="/home/<%= fetch(:user) %>",USER="<%= fetch(:user) %>"
|
4
|
-
directory=<%= fetch(:deploy_to) %>/current
|
5
|
-
command=/home/<%= fetch(:user) %>/.rvm/bin/rvm <%= fetch(:rvm_ruby_version, '2.4.7') %> do bundle exec puma -C <%= fetch(:deploy_to) %>/shared/config/puma.rb -e <%= fetch(:rails_env) %>
|
6
|
-
autostart=<%= fetch(:autostart, 'true') %>
|
7
|
-
autorestart=<%= fetch(:autorestart, 'true') %>
|
8
|
-
startsecs=5
|
9
|
-
startretries=3
|
10
|
-
stderr_logfile=<%= fetch(:deploy_to) %>/shared/log/<%= fetch(:application) %>.log
|
11
|
-
stdout_logfile=<%= fetch(:deploy_to) %>/shared/log/<%= fetch(:rails_env) %>.log
|
12
|
-
stdout_logfile_maxbytes=<%= fetch(:logfile_maxbytes, '5GB') %>
|
13
|
-
stdout_logfile_backups=<%= fetch(:logfile_backups, '10') %>
|