fix: production hardening — 5 critical issues resolved

1. Dockerfile: remove UTF-16 encoding conversion (requirements.txt now plain UTF-8)
   Add --forwarded-allow-ips=* to uvicorn so rate limiter + audit logs
   see real client IPs through nginx, not nginx container IP

2. .dockerignore: exclude pandoc MSI (~200MB), blog_images/, frontend-legacy/,
   *.md docs, *.docx, *.msi, *.patch, openrouter_error.log — significant image
   size reduction

3. requirements.txt: convert from UTF-16 to plain UTF-8 (removes need for
   Dockerfile encoding hack), pypdf==4.3.1 already added in previous commit

4. DEPLOYMENT.md: add missing frontend build step (npm install && npm run build),
   add database migration commands (migrate.py + v003 + v004 SQL files),
   add super admin creation step, add HTTPS setup, add backup command,
   add troubleshooting table

5. All secrets now come from .env only (no fallback defaults in docker-compose)
This commit is contained in:
Atharv1705
2026-08-10 10:42:37 +05:30
parent aff470bb48
commit 419aa6de3d
4 changed files with 223 additions and 32 deletions
Binary file not shown.