Prepare accounting backend for production behind nginx and CDN proxy.

Add reverse-proxy settings, stricter CORS origin parsing, and production env defaults for acc.zoneco.org and the admin panel.
This commit is contained in:
2026-07-08 02:11:32 +03:30
parent 5fb79fb7f0
commit 2a1918b47c
3 changed files with 49 additions and 11 deletions

View File

@@ -9,9 +9,9 @@ services:
environment:
SECRET_KEY: ${SECRET_KEY:-your-super-secret-key-change-in-production}
DEBUG: ${DEBUG:-False}
ALLOWED_HOSTS: ${ALLOWED_HOSTS:-localhost,127.0.0.1,accounting-backend}
ALLOWED_HOSTS: ${ALLOWED_HOSTS:-localhost,127.0.0.1,accounting-backend,acc.zoneco.org}
CORS_ALLOW_ALL_ORIGINS: ${CORS_ALLOW_ALL_ORIGINS:-True}
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS:-http://localhost:3006,http://localhost:5176,http://127.0.0.1:3006,http://127.0.0.1:5176}
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS:-http://localhost:3006,http://localhost:5176,http://127.0.0.1:3006,http://127.0.0.1:5176,https://admin.zoneco.org}
SQLITE_PATH: /data/db.sqlite3
DATABASE_URL: ${DATABASE_URL:-}
DB_HOST: accounting-db