Skip to content

Instantly share code, notes, and snippets.

@VasylShevchenko
Last active March 14, 2019 18:35
Show Gist options
  • Save VasylShevchenko/6b5a9d497f3ea9336ecbc800ec35a8bf to your computer and use it in GitHub Desktop.
Save VasylShevchenko/6b5a9d497f3ea9336ecbc800ec35a8bf to your computer and use it in GitHub Desktop.
# vim /etc/systemd/system/sidekiq.service
# sudo systemctl start sidekiq.service
# sudo systemctl enable sidekiq.service
[Unit]
Description=Sidekiq for emedcert (staging)
Wants=nginx.service postgresql.service
After=redis.service postgresql.service
[Service]
Type=simple
User=deployer
WorkingDirectory=/home/deployer/apps/APP_NAME/current
# Environment=RAILS_ENV=staging
# Environment=RAILS_ENV=production
SyslogIdentifier=sidekiq
# RVM path
# ExecStart=/home/deployer/.rvm/wrappers/ruby-2.1.10/bundle exec sidekiq -C /home/deployer/apps/APP_NAME/shared/config/sidekiq.yml -e staging
# ExecStart=/home/deployer/.rvm/wrappers/ruby-2.1.10/bundle exec sidekiq -C /home/deployer/apps/APP_NAME/shared/config/sidekiq.yml -e production
RestartSec=1
Restart=on-failure
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment