34 lines
1.2 KiB
Desktop File
34 lines
1.2 KiB
Desktop File
[Unit]
|
|
Description=Forgejo Runner
|
|
Wants=network.target
|
|
|
|
[Service]
|
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
Restart=on-failure
|
|
TimeoutStopSec=70
|
|
ExecStartPre=/bin/rm -f %t/forgejo-runner.service.pid %t/forgejo-runner.service.ctr-id
|
|
ExecStartPre=-/usr/bin/podman pull code.forgejo.org/forgejo/runner:3.3.0
|
|
ExecStart=/usr/bin/podman run \
|
|
--cidfile=%t/%n.ctr-id \
|
|
--cgroups=no-conmon \
|
|
--rm \
|
|
--sdnotify=conmon \
|
|
--user=0 \
|
|
-d \
|
|
--conmon-pidfile %t/forgejo-runner.service.pid \
|
|
--replace \
|
|
--env DOCKER_HOST=unix:///run/podman/podman.sock \
|
|
--name forgejo-runner \
|
|
-v /run/podman/podman.sock:/run/podman/podman.sock \
|
|
-v /etc/forgejo-runner:/etc/forgejo-runner:ro \
|
|
-v /opt/shared-with-host:/opt/shared-with-host \
|
|
-v /var/forgejo-runner:/data code.forgejo.org/forgejo/runner:3.3.0 forgejo-runner daemon \
|
|
-c /etc/forgejo-runner/config.yaml
|
|
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/forgejo-runner.service.ctr-id -t 10
|
|
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/forgejo-runner.service.ctr-id
|
|
PIDFile=%t/forgejo-runner.service.pid
|
|
Type=forking
|
|
RestartSec=60
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target default.target
|