Skip to content

Instantly share code, notes, and snippets.

@igkuz
Created September 16, 2019 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igkuz/681f8904ce35d1a0dffd35073a1c1f66 to your computer and use it in GitHub Desktop.
Save igkuz/681f8904ce35d1a0dffd35073a1c1f66 to your computer and use it in GitHub Desktop.
[Unicorn.service] Managing Unicorn & Puma web servers with systemd
[Unit]
Description=Unicorn service
After=network.target
[Service]
Type=forking
Environment=RAILS_ENV=production
WorkingDirectory=/apps/awesomeapp/awesomeapp-git
PIDFile=/apps/awesomeapp/awesomeapp-git/tmp/pids/unicorn.pid
ExecStart=/bin/bash -l -c 'bundle exec unicorn -c config/unicorn.rb -D'
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
KillSignal=SIGQUIT
Restart=on-failure
SyslogIdentifier=awesomeapp-unicorn
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment