fix: production deployment fixes

- .env: MYSQL_HOST=db (Docker service name, not localhost)
- .env: ALLOWED_ORIGINS includes bookkeepro.net + IP
- docker-compose.yml: add nginx service, fix MySQL user/password env vars,
  expose app on port 8000 internally only, nginx on port 80
- nginx/default.conf: serve /css /assets /images directly from dist,
  proxy /api/* to FastAPI, SPA fallback via try_files
- main.py: remove duplicate /dist mount, hide API docs in production,
  clean up static mount logic
- requirements.txt: add pypdf==4.3.1 (was missing, used by ai.py)
This commit is contained in:
Atharv1705
2026-08-10 10:30:00 +05:30
parent 9c7f25e06f
commit 1170ea38fc
4 changed files with 119 additions and 70 deletions
Binary file not shown.