Last active
July 29, 2020 19:17
-
-
Save dukedorje/b951594dd10e535e7da59824355d3db0 to your computer and use it in GitHub Desktop.
Manage Puma server with SystemD 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 HTTP Server | |
After=network.target | |
[Service] | |
Type=simple | |
User=deploy | |
WorkingDirectory=/srv/app/current | |
# Helpful for debugging socket activation, etc. | |
# Environment=PUMA_DEBUG=1 | |
Environment=RAILS_ENV=production | |
Environment=PORT=9292 | |
ExecStart=/home/deploy/.rbenv/shims/bundle exec --keep-file-descriptors puma -C /srv/app/current/config/puma.rb | |
# Variant: Specify directives inline. | |
# ExecStart=/<FULLPATH>/puma -b tcp://0.0.0.0:9292 -b ssl://0.0.0.0:9293?key=key.pem&cert=cert.pem | |
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