Created
September 6, 2016 12:33
-
-
Save redfield/ed6f71da751959cfa405874e5822f22b to your computer and use it in GitHub Desktop.
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 file for CentOS 7, Ubuntu 15.04 | |
# | |
# Customize this file based on your bundler location, app directory, etc. | |
# Put this in /usr/lib/systemd/system (CentOS) or /lib/systemd/system (Ubuntu). | |
# Run: | |
# - systemctl enable hypdf | |
# - systemctl {start,stop,restart} hypdf | |
# | |
[Unit] | |
Description=hypdf | |
# start us only once the network and logging subsystems are available | |
After=syslog.target network.target | |
# See these pages for lots of options: | |
# http://0pointer.de/public/systemd-man/systemd.service.html | |
# http://0pointer.de/public/systemd-man/systemd.exec.html | |
[Service] | |
Type=simple | |
WorkingDirectory=/home/ubuntu/www/hypdf | |
# If you use rbenv: | |
ExecStart=/bin/bash -lc 'RAILS_ENV=production bundle exec puma -C config/puma.rb' | |
# If you use the system's ruby: | |
# ExecStart=/usr/local/bin/bundle exec sidekiq -e production | |
User=ubuntu | |
Group=ubuntu | |
UMask=0002 | |
# if we crash, restart | |
RestartSec=1 | |
Restart=on-failure | |
# output goes to /var/log/syslog | |
StandardOutput=syslog | |
StandardError=syslog | |
# This will default to "bundler" if we don't specify it | |
SyslogIdentifier=hypdf | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment