Last active
January 16, 2018 12:36
-
-
Save stiig/dd1cbc8cb7bc08687b2263e9b5abfb06 to your computer and use it in GitHub Desktop.
simple puma systemd service
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
[Unit] | |
Description=My app | |
After=network.target, postgresql.service | |
[Service] | |
Type=forking | |
User=deploy | |
Environment=RAILS_ENV=production | |
Environment=RUBYOPT='-W0' | |
PIDFile=/home/deploy/apps/app_name/shared/tmp/pids/puma.pid | |
Restart=always | |
WorkingDirectory=/home/deploy/apps/app_name/current | |
ExecStart=/home/deploy/.rvm/bin/rvm 2.4.0@app_name do bundle exec puma -C /home/deploy/apps/app_name/shared/puma.rb --daemon | |
ExecStop=/home/deploy/.rvm/bin/rvm 2.4.0@app_name do bundle exec pumactl -S /home/deploy/apps/app_name/shared/tmp/pids/puma.state stop | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to /etc/systemd/system/