diff --git a/services/gitea/gitea-runner.service.toml b/services/gitea/gitea-runner.service.toml index e50bfde..a9a20bb 100644 --- a/services/gitea/gitea-runner.service.toml +++ b/services/gitea/gitea-runner.service.toml @@ -3,6 +3,7 @@ user = "podman" [service] name = "gitea-runner" image = "docker.io/gitea/act_runner:latest" +depend = ["gitea.service"] [environment] GITEA_INSTANCE_URL = "gitea" diff --git a/services/gitea/service.toml b/services/gitea/service.toml index 1dee8f5..b2da2fb 100644 --- a/services/gitea/service.toml +++ b/services/gitea/service.toml @@ -15,6 +15,9 @@ GITEA__database__PASSWD = "welcome123" GITEA_RUNNER_REGISTRATION_TOKEN_FILE = "/run/secrets/gitea-runner-registration-token" GITEA_CUSTOM = "/etc/gitea/custom" +[[secrets]] +key = "gitea-runner-registration-token" + [[networks]] name = "gitea-net" group = "caddy" diff --git a/services/gitea/update.sh b/services/gitea/update.sh index 1c024b0..6a04b76 100644 --- a/services/gitea/update.sh +++ b/services/gitea/update.sh @@ -7,4 +7,8 @@ mkdir -p /var/containers/gitea/runner cp -f ./runner-config.yaml /var/containers/gitea/runner/config.yaml cp -f ./custom /var/containers/gitea/config/custom -chown -R podman:podman /var/containers/gitea \ No newline at end of file +chown -R podman:podman /var/containers/gitea + +# Create gitea database if it doesn't exist; using PostgreSQL +cd /tmp +su -c "podman exec -it postgres psql -U admin -c 'CREATE DATABASE gitea;'" podman \ No newline at end of file