The root / endpoint in main.py was conflicting with the HTML
endpoint in auth.router, causing the homepage to return JSON
instead of rendering the HTML dashboard. Moved API info to /api
to allow auth.router to properly handle / and /login pages.
TrustedHostMiddleware was blocking localhost healthchecks from Traefik,
causing 400 Bad Request errors. When behind a reverse proxy like
Traefik/Coolify, host validation is handled by the proxy itself.
- Use virtual environment instead of --user install
- Fix PATH to /opt/venv/bin (accessible by appuser)
- Fix CMD syntax with shell form
- Add curl for healthcheck
- Proper init_db.py execution before uvicorn