summarylogtreecommitdiffstats
path: root/gitlab-pages.service
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab-pages.service')
-rw-r--r--gitlab-pages.service11
1 files changed, 7 insertions, 4 deletions
diff --git a/gitlab-pages.service b/gitlab-pages.service
index f3252552e68e..689e55396060 100644
--- a/gitlab-pages.service
+++ b/gitlab-pages.service
@@ -4,11 +4,15 @@ After=syslog.target network.target
ConditionFileIsExecutable=/usr/bin/gitlab-pages
[Service]
-User=gitlab
-Group=gitlab
+User=root
+Group=root
StartLimitInterval=5
StartLimitBurst=10
-ExecStart=/usr/bin/gitlab-pages -config /etc/gitlab-pages/config.cfg
+# systemd cannot handle User=${...}, so wrap it in ExecStart instead
+EnvironmentFile=/etc/gitlab-pages/service.env
+ExecStart=/usr/bin/setpriv --inh-caps=-all --clear-groups \
+ --reuid=${GITLAB_PAGES_UID} --regid=${GITLAB_PAGES_GID} \
+ /usr/bin/gitlab-pages -config /etc/gitlab-pages/config.cfg
Restart=always
RestartSec=120
StandardOutput=syslog
@@ -17,7 +21,6 @@ SyslogIdentifier=gitlab-pages
PrivateTmp=true
ProtectSystem=full
ProtectHome=true
-CapabilityBoundingSet=
[Install]
WantedBy=multi-user.target