variant: flatcar version: 1.0.0 systemd: units: # Gitea Actions runner. Registers once on first start and keeps its # identity (the .runner file) in /var/lib/oswald_runner on the VM's own # root disk -- not ephemeral, so it does not self-delete after each job # (that caused stale offline entries whenever the container was # interrupted before finishing a job; see flatcar-todo.md). Reusing the # same registration also means the token never needs rotating. # # /var/lib/oswald_runner survives container restarts and VM reboots (it's # on disk, not in the container), but not a VM rebuild (taint): that # recreates the disk from the image, so the runner re-registers fresh # next boot. Old entries from before this change, or from any future # rebuild, still need manual cleanup in Gitea's runner admin page. # # GITEA_RUNNER_REGISTRATION_TOKEN is templated in from Infisical # (GITEA_RUNNER_TOKEN in secrets.tmpl) by main.tf, not stored here. It # still ends up in plaintext in the rendered Ignition snippet on the # node's storage -- see the caveat in flatcar-todo.md. - name: oswald_runner.service enabled: true contents: | [Unit] Description=Gitea Actions runner After=docker.service Requires=docker.service [Service] TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker rm --force oswald_runner ExecStart=/usr/bin/docker run --name oswald_runner \ -e GITEA_INSTANCE_URL=https://git.atlashorizon.net \ -e GITEA_RUNNER_REGISTRATION_TOKEN=${gitea_runner_token} \ -e GITEA_RUNNER_NAME=oswald_runner \ -v /var/lib/oswald_runner:/data \ -v /var/run/docker.sock:/var/run/docker.sock \ docker.io/gitea/runner:3 ExecStop=/usr/bin/docker stop oswald_runner Restart=always RestartSec=5s [Install] WantedBy=multi-user.target - name: dozzle-agent.service enabled: true contents: | [Unit] Description=Dozzle Agent After=docker.service Requires=docker.service [Service] TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker rm --force dozzle-agent ExecStart=/usr/bin/docker run --name dozzle-agent \ -v /var/run/docker.sock:/var/run/docker.sock \ -p 7007:7007 \ amir20/dozzle:v11.1.1 agent ExecStop=/usr/bin/docker stop dozzle-agent Restart=always RestartSec=5s [Install] WantedBy=multi-user.target storage: directories: - path: /var/lib/oswald_runner mode: 0755