Bumps nginx from 1.28-alpine to 1.31-alpine. --- updated-dependencies: - dependency-name: nginx dependency-version: 1.31-alpine dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
# Piège : `APP_ENV` et `APP_DEBUG` sont en dur et non en `${APP_ENV:-prod}` : le `.env` du poste
|
|
# vaut `local` et reprendrait le dessus, ce qui laisserait le cookie sans `__Secure-` et
|
|
# rouvrirait `/docs`. Hors `local`, l'API exige en retour une origine CORS non vide.
|
|
# Piège : les listes de ports se cumulent à la fusion des deux fichiers. `!reset` est le seul
|
|
# moyen de dépublier 8000 et 3000 : sans lui, l'API resterait joignable en clair à côté du proxy.
|
|
# Piège : pas de `:?` sur `PUBLIC_HOST`. Compose interpole tout le fichier, y compris pour
|
|
# `stop` et `logs` : la garde vit dans `make stack-up`, qui la compare au certificat servi.
|
|
|
|
name: enervision
|
|
|
|
services:
|
|
db:
|
|
ports: !override
|
|
- "127.0.0.1:${POSTGRES_PORT:-5433}:5432"
|
|
|
|
mailpit:
|
|
ports: !override
|
|
- "127.0.0.1:${MAILPIT_UI_PORT:-8025}:8025"
|
|
|
|
airflow-webserver:
|
|
ports: !override
|
|
- "127.0.0.1:${AIRFLOW_PORT:-8080}:8080"
|
|
|
|
backend:
|
|
ports: !reset null
|
|
command:
|
|
- uvicorn
|
|
- app.main:create_app
|
|
- --factory
|
|
- --host
|
|
- 0.0.0.0
|
|
- --port
|
|
- "8000"
|
|
- --proxy-headers
|
|
- --forwarded-allow-ips=*
|
|
environment:
|
|
APP_ENV: prod
|
|
APP_DEBUG: "false"
|
|
APP_TRUST_PROXY_HEADERS: "true"
|
|
APP_CORS_ORIGINS: https://${PUBLIC_HOST:-enervision.local}
|
|
APP_FRONTEND_RESET_PASSWORD_URL: https://${PUBLIC_HOST:-enervision.local}/reset-password
|
|
|
|
frontend:
|
|
ports: !reset null
|
|
|
|
proxy:
|
|
image: nginx:1.31-alpine
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
frontend:
|
|
condition: service_started
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./infra/proxy/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- ./infra/proxy/conf.d:/etc/nginx/conf.d:ro
|
|
- ./infra/proxy/tls:/etc/nginx/tls:ro
|
|
- acme_webroot:/var/www/certbot
|
|
restart: unless-stopped
|
|
|
|
certbot:
|
|
image: certbot/certbot:v5.8.0
|
|
profiles: ["acme"]
|
|
volumes:
|
|
- letsencrypt:/etc/letsencrypt
|
|
- acme_webroot:/var/www/certbot
|
|
- ./infra/proxy/tls:/tls
|
|
- ./infra/proxy/acme-deploy-hook.sh:/deploy-hook.sh:ro
|
|
|
|
volumes:
|
|
acme_webroot:
|
|
letsencrypt:
|