Skip to content

Instantly share code, notes, and snippets.

@igkuz
Created September 16, 2019 09:15
Show Gist options
  • Select an option

  • Save igkuz/6b104a178bae8ee5a307959b035116a4 to your computer and use it in GitHub Desktop.

Select an option

Save igkuz/6b104a178bae8ee5a307959b035116a4 to your computer and use it in GitHub Desktop.
[Unicorn.service] Managing Unicorn & Puma web servers with systemd
[Unit]
Description=Puma service
After=network.target
[Service]
Type=forking
Environment=RAILS_ENV=production
WorkingDirectory=/apps/awesomeapp/awesomeapp-git
PIDFile=/apps/awesomeapp/awesomeapp-git/tmp/pids/puma.pid
ExecStart=/bin/bash -l -c 'bundle exec puma -C config/puma.rb'
ExecStop=/bin/bash -l -c 'bundle exec pumactl -F config/puma.rb stop'
ExecReload=/bin/bash -l -c 'bundle exec pumactl -F config/puma.rb phased-restart'
Restart=on-failure
SyslogIdentifier=awesomeapp-puma
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment