feat: cont demo public cu resetare automată a datelor la 3 ore

- Cont demo (demo@example.com/demo1234) activ implicit, identificat prin
  settings.demo_email — fără configurare în env; DEMO_EMAIL="" îl dezactivează
- Contul demo nu poate fi modificat prin API (email/parolă/status blocate 403)
- reset_demo.py: șterge idempotent toate datele demo și recrează proprietatea
  demo cu 3 spații și 5 rezervări exemplu cu date relative la ziua curentă
- entrypoint.sh: reset la boot + buclă la 3h (DEMO_RESET_INTERVAL)
- start.sh (dev): reset la fiecare pornire
- Login.vue: hint cu credențialele demo (click = precompletare) și mesajul
  de resetare la 3 ore

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-07-10 20:07:16 +00:00
parent c5a882ba6f
commit 98059a8a70
7 changed files with 311 additions and 0 deletions

View File

@@ -13,5 +13,19 @@ if [ "${RUN_SEED}" = "1" ]; then
python seed_db.py
fi
# Public demo account (enabled by default, see settings.demo_email):
# (re)create the demo account and its sample data at boot, then reset it
# periodically in the background (default: every 3h; override with
# DEMO_RESET_INTERVAL, in seconds). Set DEMO_EMAIL="" to disable.
echo "[entrypoint] Resetting demo account..."
python reset_demo.py || echo "[entrypoint] WARNING: demo reset failed (continuing)"
(
while true; do
sleep "${DEMO_RESET_INTERVAL:-10800}"
echo "[entrypoint] Scheduled demo reset..."
python reset_demo.py || echo "[entrypoint] WARNING: demo reset failed"
done
) &
echo "[entrypoint] Starting application..."
exec "$@"