Skip to content

Instantly share code, notes, and snippets.

@Kami-no
Last active August 29, 2015 14:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kami-no/00eb27f907966d3a149e to your computer and use it in GitHub Desktop.
Save Kami-no/00eb27f907966d3a149e to your computer and use it in GitHub Desktop.
# cat /etc/systemd/system/gitlab-sidekiq.service - for personal use
# cat /var/lib/systemd/system/gitlab-sidekiq.service - for package devs
#####################################################
#
# GitLab version : 5.x - 7.x
# Contributors : davispuh, mtorromeo, axilleas, boeserwolf91, Stefan Tatschner (rumpelsepp)
# Downloaded from : https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/init/systemd
#
####################################################
[Unit]
Description=GitLab Sidekiq Worker
Requires=redis.service
Wants=mysqld.service postgresql.service
After=redis.service mysqld.service postgresql.service
[Service]
Type=forking
User=git
WorkingDirectory=/opt/gitlab-6
Environment=RAILS_ENV=production
SyslogIdentifier=gitlab-sidekiq
PIDFile=/run/gitlab/sidekiq.pid
ExecStart=/usr/bin/bundle exec "sidekiq -d -q post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default -e production -P /run/gitlab/sidekiq.pid -d -L /var/log/gitlab/sidekiq.log >> /var/log/gitlab/sidekiq.log 2>&1"
ExecStop=/usr/bin/bundle exec "sidekiqctl stop /run/gitlab/sidekiq.pid >> /var/log/gitlab/sidekiq.log 2>&1"
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment