35 lines
1.3 KiB
Desktop File
35 lines
1.3 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.4.1
|
|
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 \
|
|
--env CONTAINER_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.4.1 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
|