Files
gitlab-recipes/init/systemd
Stefan Tatschner 91d846da7a Updated systemd service files
- Do not use a target to specify dependencies.
- Added postgresql and mysqld as optional dependencies.
  The service files work if the user has installed mysql or postgres either.
- Removed ExecStop in gitlab-unicorn.service. It is entirely wrong to do
  it in such a way, see [1]
- Added daemonize flags as it fixes systemd errors and warnings. Without
  this flags I was not able to start/stop a service properly because systemd has
  caught the wrong MainPIDs. Furthermore I had problems with service
  timouts as systemd caught the wrong return codes and considered the
  services as failed.
- Updated README.md.

[1]: http://lists.freedesktop.org/archives/systemd-devel/2014-January/016417.html
2014-10-28 08:28:58 +01:00
..
2014-10-28 08:28:58 +01: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

Reload systemd:

sudo systemctl daemon-reload

Start the services:

sudo systemctl start gitlab-sidekiq.service gitlab-unicorn.service

Enable them to start at boot:

sudo systemctl enable gitlab-sidekiq.service gitlab-unicorn.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.