-
-
Save abratashov/f4cf5bf5a300aa16161eb6e0ace9d274 to your computer and use it in GitHub Desktop.
Simple systemd script to start Rails app with puma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.