ADMIN_USERNAME/ADMIN_PASSWORD_HASH now optionally extends to _2, _3, ... for additional accounts (e.g. a second login for Lara), all with equal access - no roles, still no self-service password reset. Falls back to a dummy bcrypt compare on unknown usernames to keep login timing consistent. Verified locally: both users log in, wrong password and unknown usernames are rejected, and single-user setups still work unchanged (backward compatible). Also documents the optional second-user setup in DEPLOYMENT_ADMIN.md (B6/B7).
24 lines
824 B
Text
24 lines
824 B
Text
# Kopieren nach admin/.env (lokal) bzw. als echte Umgebungsvariablen auf dem Server setzen.
|
|
# NIEMALS mit echten Werten committen.
|
|
|
|
PORT=4321
|
|
NODE_ENV=production
|
|
|
|
# Login
|
|
ADMIN_USERNAME=pascal
|
|
# Erzeugen mit: node admin/hash-password.js "dein-passwort"
|
|
ADMIN_PASSWORD_HASH=
|
|
# Zufälligen Wert erzeugen z. B. mit: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
|
|
SESSION_SECRET=
|
|
|
|
# Weitere Benutzer sind optional: _2, _3, ... anhängen (gleiches Muster, gleicher
|
|
# hash-password.js-Befehl). Ohne diese Zeilen bleibt es bei einem Login.
|
|
#ADMIN_USERNAME_2=lara
|
|
#ADMIN_PASSWORD_HASH_2=
|
|
|
|
# Pfade (im Container i.d.R. nicht ändern, siehe DEPLOYMENT_ADMIN.md)
|
|
PROJECT_DIR=/app
|
|
CONTENT_PATH=/app/content/site.json
|
|
THEME_PATH=/app/content/theme.json
|
|
UPLOAD_DIR=/app/public/uploads
|
|
DIST_TARGET_DIR=/site-dist
|