Skip to content

Instantly share code, notes, and snippets.

@eagletmt
Created March 26, 2015 17:26
Show Gist options
  • Save eagletmt/c7a09e219b68250cb1bf to your computer and use it in GitHub Desktop.
Save eagletmt/c7a09e219b68250cb1bf to your computer and use it in GitHub Desktop.
[Unit]
Description=Tokyo Tech Coder
After=nginx.service postgresql.service redis.service
Wants=nginx.service postgresql.service redis.service
[Service]
Type=forking
User=ttcoder
WorkingDirectory=/home/ttcoder/deploy/current
ExecStart=/usr/bin/bundle exec unicorn -c /home/ttcoder/deploy/current/config/unicorn.rb -E production -D
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -QUIT $MAINPID
Restart=always
PIDFile=/home/ttcoder/deploy/current/tmp/pids/unicorn.pid
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment