debian-mirror-gitlab/debian/gitlab.gitlab-sidekiq.service
Dmitry Smirnov 17a7bccde7 Services: downgraded redis-server "Requires" to "Wants".
This allows to disable local Redis in favour of external instance.

Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2022-07-01 19:04:55 +10:00

26 lines
814 B
Desktop File

[Unit]
Description=GitLab Sidekiq Worker
PartOf=gitlab.target
Wants=redis-server.service
Wants=postgresql.service
After=redis-server.service postgresql.service
PartOf=gitlab.service
ReloadPropagatedFrom=gitlab.service
[Service]
Type=simple
WorkingDirectory=/usr/share/gitlab
EnvironmentFile=/etc/gitlab/gitlab-debian.conf
SyslogIdentifier=gitlab-sidekiq
ExecStartPre=truncate -s 0 Gemfile.lock
ExecStartPre=/usr/bin/bundle install --local --quiet
ExecStart=/usr/bin/bundle exec sidekiq \
-C /etc/gitlab/sidekiq_queues.yml \
-e $RAILS_ENV
Restart=on-abnormal
## No "Type=notify" support; wait for service to initialise:
ExecStartPost=-/bin/sh -c "for i in 4 4 4 4 4 4 4 4; do sleep $i; (ps -h -o command -p $MAINPID | grep -q -P \"sidekiq\s\d\.\d\.\d\") && exit 0; done"
[Install]
WantedBy=gitlab.target