Last active
January 22, 2018 17:24
-
-
Save zeeshangulzar/e8dbfbaa7ce378d349950ec1c5ee9a53 to your computer and use it in GitHub Desktop.
Sidekiq as a service for Cent OS/ Ubuntu
This file contains 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
# cd /usr/lib/systemd/system | |
[Unit] | |
Description=sidekiq1 | |
After=syslog.target network.target | |
[Service] | |
Type=simple | |
WorkingDirectory=/var/www/vhosts/lakeproguides.com/staging.lakeproguides.com | |
ExecStart=/usr/local/rvm/wrappers/ruby-2.3.3/bundle exec sidekiq -e production -L /var/www/vhosts/lakeproguides.com/staging.lakeproguides.com/log/sidekiq.log | |
Environment=RAILS_ENV=production | |
User=root | |
Group=root | |
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=sidekiq | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment