Updated systemd support

Support for v8 and /opt/gitlab directory.
This commit is contained in:
Dmitriy Zinin 2015-10-06 11:41:22 +10:00
parent d9841f1787
commit 63bf0e609b
5 changed files with 401 additions and 16 deletions

View file

@ -0,0 +1,25 @@
#####################################################
#
# GitLab version : 8.x - 8.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 Git HTTP Worker
Requires=gitlab-unicorn.service
Wants=gitlab-unicorn.service
After=gitlab-unicorn.service
[Service]
Type=forking
User=git
WorkingDirectory=/opt/gitlab
SyslogIdentifier=gitlab-git-http-server
PIDFile=/run/gitlab/gitlab-git-http-server.pid
ExecStart=/opt/gitlab/bin/daemon_with_pidfile /run/gitlab/gitlab-git-http-server.pid /usr/bin/gitlab-git-http-server -listenUmask 0 -listenNetwork unix -listenAddr /run/gitlab/gitlab-git-http-server.socket -authBackend http://127.0.0.1:8080 /var/lib/git/repositories/ >> /var/log/gitlab/gitlab-git-http-server.log 2>&1
[Install]
WantedBy=multi-user.target

View file

@ -1,6 +1,3 @@
# 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
@ -18,13 +15,13 @@ After=redis.service mysqld.service postgresql.service
[Service]
Type=forking
User=git
WorkingDirectory=/opt/gitlab-6
WorkingDirectory=/opt/gitlab
Environment=RAILS_ENV=production
SyslogIdentifier=gitlab-sidekiq
PIDFile=/run/gitlab/sidekiq.pid
ExecStart=/usr/bin/bundle exec "sidekiq -d -q post_receive -q mailer -q system_hook -q project_web_hook -q gitlab_shell -q common -q default -e production -P /run/gitlab/sidekiq.pid -d -L /var/log/gitlab/sidekiq.log >> /var/log/gitlab/sidekiq.log 2>&1"
ExecStart=/usr/bin/bundle exec "sidekiq -d -q archive_repo -q post_receive -q mailer -q system_hook -q project_web_hook -q gitlab_shell -q common -q 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
WantedBy=multi-user.target

View file

@ -1,6 +1,3 @@
# cat /etc/systemd/system/gitlab-unicorn.service - for personal use
# cat /var/lib/systemd/system/gitlab-unicorn.service - for package devs
#####################################################
#
# GitLab version : 5.x - 7.x
@ -17,12 +14,12 @@ After=redis.service mysqld.service postgresql.service
[Service]
User=git
WorkingDirectory=/opt/gitlab-6
WorkingDirectory=/opt/gitlab
Environment=RAILS_ENV=production
SyslogIdentifier=gitlab-unicorn
PIDFile=/run/gitlab/unicorn.pid
ExecStart=/usr/bin/bundle exec "unicorn_rails -D -c /opt/gitlab-6/config/unicorn.rb -E production"
ExecStart=/usr/bin/bundle exec "unicorn_rails -D -c /opt/gitlab/config/unicorn.rb -E production"
[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target

View file

@ -1,4 +1 @@
# cat /etc/tmpfiles.d/gitlab.conf - for personal use
# cat /usr/lib/tmpfiles.d/gitlab.conf - for package devs
d /run/gitlab 0755 git git
d /run/gitlab 0755 git git