Created
January 28, 2017 12:27
-
-
Save yusupova/795ae347e3d38b877975a524cc1d2cdc to your computer and use it in GitHub Desktop.
systemd service to start your Rails app with Puma
This file contains hidden or 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
# /etc/systemd/system/rails-puma.service | |
# rvm wrapper default systemd rails | |
# systemctl enable rails-puma | |
# systemctl start rails-puma | |
[Unit] | |
Description=Rails Puma Webserver | |
Wants=network-online.target | |
After=network.target network-online.target | |
[Service] | |
Type=simple | |
User=deploy | |
WorkingDirectory=/var/www/your-app/current | |
ExecStart=/bin/bash -lc 'bundle exec puma -C /var/www/your-app/shared/puma.rb' | |
TimeoutSec=15 | |
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