Last active
January 1, 2017 22:20
-
-
Save duderamos/070502f88c9caf900f2d9eb1ddd1c5a3 to your computer and use it in GitHub Desktop.
Unit file for unicorn
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=Unicorn Server | |
Requires=redis.service | |
Wants=mysqld.service postgresql.service | |
After=redis.service mysqld.service postgresql.service | |
[Service] | |
Type=forking | |
User=netengine | |
WorkingDirectory=/var/www/unicorn/current | |
Environment=RAILS_ENV=production | |
SyslogIdentifier=unicorn | |
PIDFile=/var/www/unicorn/current/tmp/pids/unicorn.pid | |
Restart=always | |
ExecStart=/bin/sh -c "/etc/rbenv/shims/bundle exec unicorn_rails -D -c /var/www/unicorn/current/config/unicorn.rb -E production" | |
ExecReload=/bin/sh -c "/bin/kill -USR2 $MAINPID ; sleep 6 ; /bin/kill -QUIT $MAINPID" | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment