Created
June 1, 2017 13:33
-
-
Save halida/56868b195b53b5644fb703bcd7257efb to your computer and use it in GitHub Desktop.
Manage rails process by systemd
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
# copy from https://github.com/macournoyer/thin/pull/184#issuecomment-191119259 | |
[Unit] | |
Description=haterslist | |
After=syslog.target network.target | |
[Service] | |
Type=forking | |
User=production | |
Group=production | |
WorkingDirectory=/home/production/apps/haterslist/current | |
ExecStart=/bin/bash -lc 'bundle exec thin start -C /home/production/apps/haterslist/current/config/thin.yml' | |
ExecReload=/bin/bash -lc 'bundle exec thin restart -C /home/production/apps/haterslist/current/config/thin.yml' | |
ExecStop=/bin/bash -lc 'bundle exec thin stop -C /home/production/apps/haterslist/current/config/thin.yml' | |
MemoryMax=512M | |
Restart=always | |
RestartSec=3 | |
TimeoutSec=300 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment