fix(gitea): fall back to INITIAL_ADMIN_PASSWORD for gitea-init
Previously both compose files defaulted GITEA_ADMIN_PASSWORD to empty, and scripts/gitea-init.sh silently skipped admin creation on blank input. If config.sh failed to propagate the password (e.g. Docs Comments not enabled, or --admin-password omitted), fresh installs ended up with a Gitea container running but zero users — and the admin GUI's Gitea setup wizard had no token to progress. Changes: - docker-compose.yml + docker-compose.prod.yml: GITEA_ADMIN_PASSWORD now falls back to INITIAL_ADMIN_PASSWORD when unset - .env.example: declare GITEA_ADMIN_PASSWORD= with explanatory comment so users discover the override - scripts/gitea-init.sh: silent skip becomes a loud WARN so a broken config is visible in compose logs Bunker Admin
This commit is contained in:
@@ -231,6 +231,9 @@ GITEA_WEB_PORT=3030
|
||||
GITEA_SSH_PORT=2222
|
||||
# Admin user (auto-created on first boot by gitea-init.sh)
|
||||
GITEA_ADMIN_USER=admin
|
||||
# Leave blank to reuse INITIAL_ADMIN_PASSWORD (compose resolves the fallback).
|
||||
# Set only if you want a distinct password for the Gitea admin account.
|
||||
GITEA_ADMIN_PASSWORD=
|
||||
GITEA_DB_TYPE=mysql
|
||||
GITEA_DB_HOST=gitea-db:3306
|
||||
GITEA_DB_NAME=gitea
|
||||
|
||||
Reference in New Issue
Block a user