This repository has been archived by the owner on Dec 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(appserver): use
pumactl start
for restart if the puma.state
f…
- Loading branch information
Showing
2 changed files
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<% pid_file = "/run/lock/#{@app_shortname}/#{@appserver_name}.pid" %> | ||
<% state_file = "/run/lock/#{@app_shortname}/#{@appserver_name}.state" %> | ||
<% app_dir = File.join(@deploy_to, 'current') %> | ||
<% config_file = File.join(@deploy_to, 'shared/config/puma.rb') %> | ||
<% env = @environment.map {|k,v| "#{k}=\"#{v}\""}.join(' ') %> | ||
<% pumactl = "#{env} bundle exec pumactl -F #{config_file}"%> | ||
|
||
check process <%= @appserver_name %>_<%= @app_shortname %> with pidfile <%= pid_file %> | ||
start program = "/bin/sh -c 'cd <%= app_dir %> && <%= pumactl %> start | logger -t <%= @appserver_name %>-<%= @app_shortname %>'" as uid "<%= node['deployer']['user'] %>" and gid "<%= node['deployer']['group'] %>" with timeout 90 seconds | ||
restart program = "/bin/sh -c 'cd <%= app_dir %> && <%= pumactl %> restart | logger -t <%= @appserver_name %>-<%= @app_shortname %>'" as uid "<%= node['deployer']['user'] %>" and gid "<%= node['deployer']['group'] %>" with timeout 90 seconds | ||
restart program = "/bin/sh -c '(cd <%= app_dir %> && if [ -f <%= state_file %> ]; then <%= pumactl %> restart; else <%= pumactl %> start; fi) | logger -t <%= @appserver_name %>-<%= @app_shortname %>'" as uid "<%= node['deployer']['user'] %>" and gid "<%= node['deployer']['group'] %>" with timeout 90 seconds | ||
stop program = "/bin/sh -c 'cd <%= app_dir %> && <%= pumactl %> stop | logger -t <%= @appserver_name %>-<%= @app_shortname %>'" as uid "<%= node['deployer']['user'] %>" and gid "<%= node['deployer']['group'] %>" with timeout 90 seconds | ||
group <%= @appserver_name %>_<%= @app_shortname.to_s %>_group |