{# Copyright (C) 2013-2015 GitLab B.V. <https://gitlab.com/>
 # Copyright (C) 2017      Markus Wigge <wigge@beuth-hochschule.de>
 # Copyright (C) 2017      Maciej Delmanowski <drybjed@gmail.com>
 # Copyright (C) 2017      Fabio Bonelli <fb@fabiobonelli.it>
 # Copyright (C) 2017      DebOps <https://debops.org/>
 # SPDX-License-Identifier: MIT
 #}
#
# {{ ansible_managed }}
#
#####################################################
#
# 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 Unicorn Server
Wants=redis-server.service postgresql.service
After=redis-server.service postgresql.service
PartOf=gitlab.slice

[Service]
Slice=gitlab.slice
User={{ gitlab_user }}
WorkingDirectory={{ gitlab_app_root_path }}/gitlab
Environment=RAILS_ENV=production
SyslogIdentifier=gitlab-unicorn
PIDFile={{ gitlab_app_root_path }}/gitlab/tmp/pids/unicorn.pid

ExecStart=/usr/bin/bundle exec "unicorn_rails -D -c {{ gitlab_app_root_path }}/gitlab/config/unicorn.rb -E production"

[Install]
WantedBy=multi-user.target
