From 862dc370f70712ddd744a215a3b0c91adba457a4 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 9 Jun 2026 00:54:48 +0000 Subject: [PATCH] fix(gitea): use /data volume path for the non-rootless image The 1.22 (non-rootless) image expects everything under /data (/data/gitea/conf/app.ini, /data/git/repositories, etc.). I'd configured the rootless paths (/var/lib/gitea + /etc/gitea), so the app.ini that gitea writes on first boot landed in the container's ephemeral fs instead of the host volume. Result: 'docker exec gitea gitea admin user create' could not find the config and bailed with 'Unable to load config file for a installed Gitea instance'. Also set GITEA__security__INSTALL_LOCK=true so the first boot bypasses the /install web wizard since every required field is already provided via GITEA__* env vars. Migration for an existing broken install: make down-gitea sudo rm -rf infra/gitea/gitea/data infra/gitea/gitea/config make up-gitea --- .gitignore | 1 - infra/gitea/docker-compose.yml | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index da25c3f..342a3e9 100644 --- a/.gitignore +++ b/.gitignore @@ -32,7 +32,6 @@ infra/main/pgadmin/data/ infra/main/caddy/data/ infra/main/caddy/config/ infra/gitea/gitea/data/ -infra/gitea/gitea/config/ infra/gitea/runner/data/ infra/wedding_photo/backups/ diff --git a/infra/gitea/docker-compose.yml b/infra/gitea/docker-compose.yml index fb180b3..a916c09 100644 --- a/infra/gitea/docker-compose.yml +++ b/infra/gitea/docker-compose.yml @@ -30,6 +30,8 @@ services: # Service GITEA__service__DISABLE_REGISTRATION: ${GITEA_DISABLE_REGISTRATION:-true} GITEA__service__REQUIRE_SIGNIN_VIEW: ${GITEA_REQUIRE_SIGNIN:-false} + # Pula a tela /install no primeiro boot (toda config vem via env). + GITEA__security__INSTALL_LOCK: "true" # Actions GITEA__actions__ENABLED: "true" GITEA__actions__DEFAULT_ACTIONS_URL: github @@ -37,8 +39,7 @@ services: # SSH pra git push/pull. UI passa pelo Caddy (porta 443). - "${GITEA_SSH_PORT:-2222}:22" volumes: - - ./gitea/data:/var/lib/gitea - - ./gitea/config:/etc/gitea + - ./gitea/data:/data networks: - infra-net