Skip to content

Instantly share code, notes, and snippets.

@hardywu
Created March 15, 2021 04:24
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 hardywu/7101746c62613def72163c4bde6aa864 to your computer and use it in GitHub Desktop.
Save hardywu/7101746c62613def72163c4bde6aa864 to your computer and use it in GitHub Desktop.
Puma HTTP Server for ruby on rails
[Unit]
Description=Puma HTTP Server for rails (staging)
After=network.target
[Service]
Type=simple
User=deploy
WorkingDirectory=/home/deploy/apps/myApp/current
Environment=RBENV_ROOT=$HOME/.rbenv
ExecStart=/home/deploy/.rbenv/shims/bundle exec puma -C /home/deploy/apps/myApp/shared/puma.rb
ExecReload=/bin/kill -TSTP $MAINPID
StandardOutput=append:/home/deploy/apps/myApp/current/log/puma.access.log
StandardError=append:/home/deploy/apps/myApp/current/log/puma.error.log
Restart=always
RestartSec=1
SyslogIdentifier=puma
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment