Separate local vs remote Gitea API tokens to prevent credential collision

GITEA_API_TOKEN is for the local platform Gitea (docs comments, user
provisioning, SSO). New GITEA_REGISTRY_API_TOKEN is for the remote
registry at gitea.bnkops.com (release uploads via build-release.sh).

Previously both contexts shared one variable, causing auth failures
when the token for one instance was used against the other.

Bunker Admin
This commit is contained in:
2026-03-31 11:53:20 -06:00
parent 91db29402c
commit f378db89b5
3 changed files with 17 additions and 8 deletions

View File

@@ -183,14 +183,15 @@ const envSchema = z.object({
MEDIA_UPLOADS: z.string().default('/media/uploads'),
MAX_UPLOAD_SIZE_GB: z.coerce.number().default(10),
// Container Registry
// Container Registry (remote — gitea.bnkops.com)
GITEA_REGISTRY: z.string().default('gitea.bnkops.com/admin'),
GITEA_REGISTRY_USER: z.string().default(''),
GITEA_REGISTRY_PASS: z.string().default(''),
GITEA_REGISTRY_API_TOKEN: z.string().default(''), // For release uploads (build-release.sh)
// Gitea Docs Comments
// Gitea Docs Comments (local platform instance)
GITEA_COMMENTS_ENABLED: z.string().default('false'),
GITEA_API_TOKEN: z.string().default(''),
GITEA_API_TOKEN: z.string().default(''), // Local Gitea — NOT the remote registry
GITEA_COMMENTS_REPO_OWNER: z.string().default(''),
GITEA_COMMENTS_REPO_NAME: z.string().default('docs-comments'),
GITEA_OAUTH_CLIENT_ID: z.string().default(''),