From ff25f26b6c78811433c01c6481721bfec5fa85f0 Mon Sep 17 00:00:00 2001 From: cyph3rasi Date: Sun, 12 Jul 2026 02:21:46 -0700 Subject: [PATCH] Persist Gitea sessions across deployments Hop-State: A_06FNB8FT1R0PTP3714DKX4R Hop-Proposal: R_06FNB8F6MX8E54KXGS48WK8 Hop-Task: T_06FNB715NCG0M3SVDJAGHY8 Hop-Attempt: AT_06FNB715NCK5MKAVH59TE0G --- compose.yaml | 1 + docs/production-deployment.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/compose.yaml b/compose.yaml index 41bc63a..075114a 100644 --- a/compose.yaml +++ b/compose.yaml @@ -38,6 +38,7 @@ services: GITEA__service__DISABLE_REGISTRATION: ${GITEA_DISABLE_REGISTRATION:-false} GITEA__actions__ENABLED: ${GITEA_ACTIONS_ENABLED:-true} GITEA__security__INSTALL_LOCK: "true" + GITEA__session__PROVIDER: db GITEA__webhook__ALLOWED_HOST_LIST: control-plane ports: - "${GITEA_HTTP_BIND:-0.0.0.0}:${GITEA_HTTP_PORT:-3000}:3000" diff --git a/docs/production-deployment.md b/docs/production-deployment.md index 12975cc..92e25d6 100644 --- a/docs/production-deployment.md +++ b/docs/production-deployment.md @@ -18,6 +18,10 @@ GITEA_DISABLE_REGISTRATION=true GITEA_ACTIONS_ENABLED=false ``` +Keep `GITEA__session__PROVIDER=db` in the Compose service. Gitea otherwise +defaults to in-memory sessions, which signs every user out whenever the +container restarts. + Start the services and install the Hop-native Gitea assets: ```sh