summarylogtreecommitdiffstats
path: root/gitlab-unicorn.service
blob: 19fafe4a09fe56ae4ad125777c8fe5694560e6cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[Unit]
Description=GitLab Unicorn Server
Requires=redis.service
Wants=mysqld.service postgresql.service
After=redis.service mysqld.service postgresql.service network.target
StartLimitIntervalSec=100s

[Service]
User=gitlab
Group=gitlab
WorkingDirectory=<DATADIR>
# Prevent ExecJS from complaining that Node is not installed in production
Environment=RAILS_ENV=production EXECJS_RUNTIME=Disabled
SyslogIdentifier=gitlab-unicorn
PIDFile=/run/gitlab/unicorn.pid
RuntimeDirectory=gitlab
RuntimeDirectoryMode=775
PrivateTmp=true
PrivateDevices=true
ProtectSystem=full
ProtectHome=true
# These options break Gitlab's email delivery if you
# use postfix' sendmail wrapper. If you use an SMTP server
# instead you can safely enable these security features.
#NoNewPrivileges=true
#CapabilityBoundingSet=
ExecStart=/usr/bin/bundle exec unicorn_rails -c <DATADIR>/config/unicorn.rb -E production
ExecStop=/usr/bin/kill -QUIT $MAINPID
ExecReload=/usr/bin/kill -USR2 $MAINPID
Restart=on-failure
RestartSec=1

[Install]
WantedBy=multi-user.target