Skip to content

Instantly share code, notes, and snippets.

@abratashov
Forked from arslan-gg/app_name.service
Last active January 25, 2018 23:17
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 abratashov/f4cf5bf5a300aa16161eb6e0ace9d274 to your computer and use it in GitHub Desktop.
Save abratashov/f4cf5bf5a300aa16161eb6e0ace9d274 to your computer and use it in GitHub Desktop.
Simple systemd script to start Rails app with puma
[Unit]
Description=Puma HTTP Server
Requires=network.target
[Service]
Type=simple
User=deployer
WorkingDirectory=/home/deployer/apps/pergam/current
ExecStart=/bin/bash -lc 'bundle exec puma -C /home/deployer/apps/pergam/shared/puma.rb'
TimeoutSec=60s
RestartSec=30s
Restart=always
[Install]
WantedBy=multi-user.target
@abratashov
Copy link
Author

abratashov commented Jan 25, 2018

Store file in: /etc/systemd/system/pergam.service
After it call: sudo systemctl daemon-reload
Enable service: sudo systemctl enable pergam.service
Start service: sudo systemctl start pergam.service
Use sudo journalctl for debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment