Last active
October 3, 2018 17:40
-
-
Save rraallvv/a5397098fc8f5239dac8c312a98e7a7e to your computer and use it in GitHub Desktop.
systemd unit for Phusion Passenger
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
# systemd unit for Phusion Passenger | |
# /lib/systemd/system/peatio.service | |
[Unit] | |
Description=Peatio Service | |
After=network.target | |
StartLimitInterval=0 | |
[Service] | |
Type=forking | |
PrivateTmp=yes | |
#User=deploy | |
#Group=deploy | |
WorkingDirectory=/home/deploy/peatio | |
PIDFile=/run/passenger/app.pid | |
Environment="PATH=/home/deploy/.rvm/gems/ruby-2.5.0/bin:/home/deploy/.rvm/gems/ruby-2.5.0@global/bin:/home/deploy/.rvm/rubies/ruby-2.5.0/bin:/home/deploy/.rvm/bin:/home/deploy/bin:/home/deploy/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" | |
Environment="GEM_HOME=/home/deploy/.rvm/gems/ruby-2.5.0" | |
Environment="GEM_PATH=/home/deploy/.rvm/gems/ruby-2.5.0:/home/deploy/.rvm/gems/ruby-2.5.0@global" | |
ExecStart=/home/deploy/.rvm/bin/rvm-exec ruby-2.5.0 bundle exec passenger start --pid-file /run/passenger/app.pid --log-file /home/deploy/peatio/log/service.log --environment production --user deploy --daemonize | |
ExecReload=/home/deploy/.rvm/bin/rvm-exec ruby-2.5.0 bundle exec passenger-config restart-app /home/deploy/peatio | |
ExecStop=/home/deploy/.rvm/bin/rvm-exec ruby-2.5.0 bundle exec passenger stop --pid-file /run/passenger/app.pid | |
#Restart=always | |
#RestartSec=1 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment