claude/heroku-clone-mvp-plan-NREhc #1

Merged
sander merged 42 commits from claude/heroku-clone-mvp-plan-NREhc into main 2026-03-29 07:24:40 +00:00
2 changed files with 25 additions and 1 deletions
Showing only changes of commit 4ac5700ac5 - Show all commits

View file

@ -109,14 +109,16 @@ services:
image: data.forgejo.org/forgejo/runner:6 image: data.forgejo.org/forgejo/runner:6
container_name: act_runner container_name: act_runner
restart: unless-stopped restart: unless-stopped
command: ["/entrypoint.sh"]
environment: environment:
FORGEJO_INSTANCE_URL: https://${FORGEJO_DOMAIN} FORGEJO_INSTANCE_URL: https://${FORGEJO_DOMAIN}
FORGEJO_RUNNER_REGISTRATION_TOKEN: ${FORGEJO_RUNNER_TOKEN} FORGEJO_RUNNER_TOKEN: ${FORGEJO_RUNNER_TOKEN}
FORGEJO_RUNNER_NAME: hiy-runner FORGEJO_RUNNER_NAME: hiy-runner
# Give the runner access to Podman so CI jobs can build/run containers. # Give the runner access to Podman so CI jobs can build/run containers.
DOCKER_HOST: tcp://podman-proxy:2375 DOCKER_HOST: tcp://podman-proxy:2375
volumes: volumes:
- act_runner_data:/data - act_runner_data:/data
- ./runner-entrypoint.sh:/entrypoint.sh:ro
depends_on: depends_on:
- forgejo - forgejo
- podman-proxy - podman-proxy

22
infra/runner-entrypoint.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/sh
# runner-entrypoint.sh — register the Forgejo runner on first start, then run the daemon.
#
# On first run (no /data/.runner file) it calls create-runner-file to register
# with the Forgejo instance using FORGEJO_RUNNER_TOKEN. On subsequent starts it
# goes straight to the daemon.
set -e
CONFIG=/data/.runner
if [ ! -f "$CONFIG" ]; then
echo "[runner] No registration found — registering with Forgejo…"
forgejo-runner create-runner-file \
--instance "${FORGEJO_INSTANCE_URL}" \
--secret "${FORGEJO_RUNNER_TOKEN}" \
--name "${FORGEJO_RUNNER_NAME:-hiy-runner}" \
--connect
echo "[runner] Registration complete."
fi
echo "[runner] Starting daemon…"
exec forgejo-runner daemon --config "$CONFIG"