From e3bcf9b1b86e94394746aabaa6e033f0e4ded7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Fri, 7 Apr 2017 18:27:02 +0200 Subject: [PATCH] Add reload support to mastodon-web systemd service --- .../templates/default/mastodon-web.systemd.service.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/site-cookbooks/kosmos-mastodon/templates/default/mastodon-web.systemd.service.erb b/site-cookbooks/kosmos-mastodon/templates/default/mastodon-web.systemd.service.erb index 879d87c..a3464dd 100644 --- a/site-cookbooks/kosmos-mastodon/templates/default/mastodon-web.systemd.service.erb +++ b/site-cookbooks/kosmos-mastodon/templates/default/mastodon-web.systemd.service.erb @@ -8,10 +8,14 @@ After=postgresql@9.4-main.service [Service] Type=simple User=<%= @user %> +PIDFile=<%= @app_dir %>/tmp/puma.pid WorkingDirectory=<%= @app_dir %> Environment="RAILS_ENV=production" Environment="PORT=3000" -ExecStart=/usr/local/bin/bundle exec puma -C config/puma.rb +ExecStart=/usr/local/bin/bundle exec puma -C config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid +ExecStop=/usr/local/bin/bundle exec puma -C config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid stop +ExecReload=/usr/local/bin/bundle exec pumactl -F config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid phased-restart +ExecRestart=/usr/local/bin/bundle exec pumactl -F config/puma.rb --pidfile <%= @app_dir %>/tmp/puma.pid restart TimeoutSec=15 Restart=always