On Thu, 2020-03-26 at 14:33 +0100, Erik Skultety wrote:
+++ b/guests/playbooks/update/templates/gitlab-runner.service.j2
@@ -0,0 +1,12 @@
+[Unit]
+Description=GitLab Runner
+After=network.target
+ConditionFileIsExecutable=/usr/local/bin/gitlab-runner
+
+[Service]
+ExecStart=/usr/local/bin/gitlab-runner run --user gitlab --working-directory
/home/gitlab --config /home/gitlab/.gitlab-runner/config.toml
Since we're going to use /home/gitlab as the base directory for all
things gitlab-runner, I would suggest we store the gitlab-runner
binary itself inside that directory too, and since we're pointing
the application to the configuration file explicitly we could
shorten that a bit and use /home/gitlab/config.toml as the path.
The only setting that concerns me a bit is --working-directory: is
that the base directory for gitlab-runner's operation, or is that
the one where it will store source code and temporary files? Because
in the latter case I would feel more comfortable if we used a
subdirectory of /home/gitlab, rather than the home directory itself,
as path.
--
Andrea Bolognani / Red Hat / Virtualization