-
-
Save bindiry/bdc98911702d6f953baaa889d7b6a9e8 to your computer and use it in GitHub Desktop.
Manage Puma with systemd on Ubuntu 16.04 and rbenv
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 Rails Server | |
After=network.target | |
[Service] | |
Type=simple | |
User=deploy | |
WorkingDirectory=/home/deploy/app/current | |
ExecStart=/home/deploy/.rbenv/bin/rbenv exec bundle exec puma -C /home/deploy/app/shared/config/puma.rb | |
ExecStop=/home/deploy/.rbenv/bin/rbenv exec bundle exec pumactl -S /home/deploy/app/shared/tmp/pids/puma.state stop | |
TimeoutSec=15 | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
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=Test Rails Server | |
After=network.target | |
[Service] | |
Type=simple | |
User=deploy | |
WorkingDirectory=/home/deploy/app/current | |
ExecStart=/home/deploy/.rbenv/shims/bundle exec puma -C /home/deploy/app/shared/config/puma.rb config.ru | |
ExecStop=/home/deploy/.rbenv/shims/bundle exec pumactl -S /home/deploy/app/shared/tmp/pids/puma.state stop | |
PIDFile=/home/deploy/app/shared/tmp/pids/puma.pid | |
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