Files
training-software/.env.example
Paperclip CTO e92ae6c136 feat(TRA-362): add docker-compose.prod.yml with nginx as web server
Introduces a production Docker Compose stack that places nginx in front
of gunicorn. nginx serves the frontend SPA and Django static files
directly, and proxies all backend routes (/api, /admin, /healthz, etc.)
to the Django container. SECURE_SSL_REDIRECT is now env-configurable so
plain-HTTP nginx deployments work without separate settings files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 08:08:52 +02:00

45 lines
1.5 KiB
Plaintext

# Copy this to .env and fill in all values before starting.
# Never commit .env to version control.
# ---- Django ----
DJANGO_SECRET_KEY=replace-with-a-secure-random-key
DJANGO_SETTINGS_MODULE=config.settings.local
DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1
# ---- Database ----
# DB_PASSWORD is used by docker-compose.prod.yml to set the postgres password
# and build the DATABASE_URL automatically.
DB_PASSWORD=replace-with-a-secure-db-password
# Format: postgres://USER:PASSWORD@HOST:PORT/DBNAME (used in dev/local)
DATABASE_URL=postgres://training:training@localhost:5432/training
# ---- nginx / TLS ----
# Set to false when nginx serves plain HTTP; set to true when TLS is terminated
# at nginx or an upstream proxy. Only used with config.settings.prod.
SECURE_SSL_REDIRECT=false
HTTP_PORT=80
# ---- Redis / Cache / Celery broker ----
# Format: redis://[:password@]host:port/db
REDIS_URL=redis://localhost:6379/0
# ---- OIDC (Authentik) ----
OIDC_RP_CLIENT_ID=
OIDC_RP_CLIENT_SECRET=
OIDC_OP_AUTHORIZATION_ENDPOINT=https://auth.example.com/application/o/authorize/
OIDC_OP_TOKEN_ENDPOINT=https://auth.example.com/application/o/token/
OIDC_OP_USER_ENDPOINT=https://auth.example.com/application/o/userinfo/
OIDC_OP_JWKS_ENDPOINT=https://auth.example.com/application/o/training/jwks/
OIDC_RP_SIGN_ALGO=RS256
# ---- Storage (prod only) ----
AWS_STORAGE_BUCKET_NAME=
AWS_S3_REGION_NAME=eu-central-1
# ---- Email (prod only) ----
EMAIL_HOST=
EMAIL_PORT=587
EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
DEFAULT_FROM_EMAIL=noreply@example.com