Files
gitlab-recipes/init/systemd
Achilleas Pipinellis 93e8ea63d4 Merge pull request #271 from waxzce/master
Add mailroom service
2015-10-16 09:51:43 +03:00
..
2015-10-14 22:46:20 +00:00
2015-10-14 22:47:18 +00:00

GitLab startup services for systemd (Archlinux, Fedora, etc)

GitLab requires a couple of services:

  • Web server (apache, nginx, etc.)
  • Redis server
  • Mail server (postfix or other)
  • GitLab Sidekiq service (gitlab-sidekiq.service)
  • Unicorn service (gitlab-unicorn.service)

Setup GitLab services

Copy files to /etc/systemd/system/:

sudo su
cd /etc/systemd/system/
wget -O gitlab-sidekiq.service https://gitlab.com/gitlab-org/gitlab-recipes/raw/master/init/systemd/gitlab-sidekiq.service
wget -O gitlab-unicorn.service https://gitlab.com/gitlab-org/gitlab-recipes/raw/master/init/systemd/gitlab-unicorn.service
wget -O gitlab-git-http.service https://gitlab.com/gitlab-org/gitlab-recipes/raw/master/init/systemd/gitlab-git-http.service
wget -O gitlab-git-http.service https://gitlab.com/gitlab-org/gitlab-recipes/raw/master/init/systemd/gitlab-mailroom.service

Reload systemd:

sudo systemctl daemon-reload

Start the services:

sudo systemctl start gitlab-sidekiq.service gitlab-unicorn.service gitlab-git-http.service gitlab-mailroom.service

Enable them to start at boot:

sudo systemctl enable gitlab-sidekiq.service gitlab-unicorn.service gitlab-git-http.service gitlab-mailroom.service

Notes

  • If you installed GitLab in other path than /home/git/gitlab change the service files accordingly.

  • /etc/systemd/system/ have a higher precedence over /usr/lib/systemd/system.