Created
June 6, 2015 00:02
-
-
Save ejangi/6944fcfbbccfa98d9a9e to your computer and use it in GitHub Desktop.
systemd file for standalone passenger apps
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=Passenger Standalone Application Server | |
After=network.target | |
[Service] | |
Type=forking | |
PrivateTmp=yes | |
User=nginx | |
Group=nginx | |
WorkingDirectory=/srv/www/%i | |
#RuntimeDirectory=passenger | |
#RuntimeDirectoryMode=0755 | |
PIDFile=/run/passenger/app.%i.pid | |
Environment="PATH=/usr/local/rvm/rubies/ruby-1.9.3-p551/bin:/usr/local/bin:/usr/bin" | |
Environment="GEM_HOME=/usr/local/rvm/gems/ruby-1.9.3-p551" | |
Environment="GEM_PATH=/usr/local/rvm/gems/ruby-1.9.3-p551" | |
Environment="PASSENGER_INSTANCE_REGISTRY_DIR=/run/passenger" | |
ExecStart=/usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.8/bin/passenger start current --daemonize --instance-registry-dir /run/passenger --socket /run/passenger/app.%i.sock --pid-file /run/passenger/app.%i.pid --log-file /srv/www/%i/shared/log/passenger.log --environment production --max-pool-size=16 | |
ExecReload=/usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.8/bin/passenger-config restart-app /apps/%i | |
ExecStop=/usr/local/rvm/gems/ruby-1.9.3-p551/gems/passenger-5.0.8/bin/passenger stop --pid-file /run/passenger/app.%i.pid | |
[Install] | |
WantedBy=multi-user.target | |
# enable by running ln -s [path-to-this-dir]/passenger\@.service /etc/systemd/system/multi-user.target.wants/passenger@[app-name].service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment