Create the first superadmin from DOCWELL_ADMIN_EMAIL on start

When DOCWELL_ADMIN_EMAIL and DOCWELL_ADMIN_PASSWORD are set (and
optionally DOCWELL_ADMIN_NAME), docwell-server creates that account as
superadmin on start while the instance has no accounts. Once any account
exists it changes nothing, so restarts never reset the password or a role
changed in the admin panel. Without them, the first sign-up still wins.

Pass the variables through every compose file, document them in the
.env examples and the configuration, access and quick-start guides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tajniak81andClaude Opus 5.5 committed 2026-11-13 22:32:29 +01:00
1 parent b9be8be156
commit 3c7403ddf9
27 files changed
+239 -3

No files matched your search

+4
View File
@@ -40,6 +40,10 @@ services:
DOCWELL_CORS_ORIGINS: ${DOCWELL_WEB_URL:-http://localhost:3000}
# Defaults until a superadmin saves signup rules in the admin panel.
DOCWELL_SIGNUP_ENABLED: ${DOCWELL_SIGNUP_ENABLED:-true}
# Optional: creates the first account as superadmin while there are no accounts.
DOCWELL_ADMIN_EMAIL: ${DOCWELL_ADMIN_EMAIL:-}
DOCWELL_ADMIN_PASSWORD: ${DOCWELL_ADMIN_PASSWORD:-}
DOCWELL_ADMIN_NAME: ${DOCWELL_ADMIN_NAME:-}
DOCWELL_SIGNUP_DOMAINS: ${DOCWELL_SIGNUP_DOMAINS:-}
DOCWELL_MAX_UPLOAD_MB: ${DOCWELL_MAX_UPLOAD_MB:-50}
# Written into PocketBase on every start. PocketBase sends the auth