♻️ Simplify environment defaults (#2415)

## AI Disclaimer

Using Codex with gpt-5.6-sol. Reviewed manually.
This commit is contained in:
Sebastián Ramírez
2026-08-10 17:39:59 +02:00
committed by GitHub
parent 029e929253
commit 4632845a39
4 changed files with 3 additions and 14 deletions
-5
View File
@@ -5,10 +5,6 @@ DOMAIN=localhost
# To test the local Traefik config # To test the local Traefik config
# DOMAIN=localhost.tiangolo.com # DOMAIN=localhost.tiangolo.com
# Public frontend URL, used by the backend to generate links in emails.
# Deployments derive this from DOMAIN in compose.deploy.yml.
FRONTEND_HOST=http://localhost:5173
# Environment: local, staging, production # Environment: local, staging, production
ENVIRONMENT=local ENVIRONMENT=local
@@ -31,7 +27,6 @@ SMTP_PORT=1025
# Postgres # Postgres
POSTGRES_SERVER=localhost POSTGRES_SERVER=localhost
POSTGRES_PORT=5432
POSTGRES_DB=app POSTGRES_DB=app
POSTGRES_USER=postgres POSTGRES_USER=postgres
POSTGRES_PASSWORD=changethis POSTGRES_PASSWORD=changethis
+3 -3
View File
@@ -88,15 +88,15 @@ services:
depends_on: depends_on:
- backend - backend
- mailcatcher - mailcatcher
env_file:
- .env
environment: environment:
- FIRST_SUPERUSER=${FIRST_SUPERUSER?Variable not set}
- FIRST_SUPERUSER_PASSWORD=${FIRST_SUPERUSER_PASSWORD?Variable not set}
- PLAYWRIGHT_BASE_URL=http://backend:8000 - PLAYWRIGHT_BASE_URL=http://backend:8000
- VITE_API_URL=http://backend:8000 - VITE_API_URL=http://backend:8000
- MAILCATCHER_HOST=http://mailcatcher:1080 - MAILCATCHER_HOST=http://mailcatcher:1080
# For the reports when run locally # For the reports when run locally
- PLAYWRIGHT_HTML_HOST=0.0.0.0 - PLAYWRIGHT_HTML_HOST=0.0.0.0
- CI=${CI} - CI=${CI:-}
volumes: volumes:
- ./frontend/blob-report:/app/frontend/blob-report - ./frontend/blob-report:/app/frontend/blob-report
- ./frontend/test-results:/app/frontend/test-results - ./frontend/test-results:/app/frontend/test-results
-4
View File
@@ -27,8 +27,6 @@ services:
timeout: 10s timeout: 10s
volumes: volumes:
- app-db-data:/var/lib/postgresql - app-db-data:/var/lib/postgresql
env_file:
- .env
environment: environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set}
- POSTGRES_USER=${POSTGRES_USER?Variable not set} - POSTGRES_USER=${POSTGRES_USER?Variable not set}
@@ -59,7 +57,6 @@ services:
condition: service_completed_successfully condition: service_completed_successfully
# The YAML anchor lets the prestart service reuse this environment mapping. # The YAML anchor lets the prestart service reuse this environment mapping.
environment: &backend-environment environment: &backend-environment
FRONTEND_HOST: ${FRONTEND_HOST?Variable not set}
ENVIRONMENT: ${ENVIRONMENT} ENVIRONMENT: ${ENVIRONMENT}
PROJECT_NAME: ${PROJECT_NAME?Variable not set} PROJECT_NAME: ${PROJECT_NAME?Variable not set}
BACKEND_CORS_ORIGINS: ${BACKEND_CORS_ORIGINS} BACKEND_CORS_ORIGINS: ${BACKEND_CORS_ORIGINS}
@@ -71,7 +68,6 @@ services:
SMTP_PASSWORD: ${SMTP_PASSWORD} SMTP_PASSWORD: ${SMTP_PASSWORD}
EMAILS_FROM_EMAIL: ${EMAILS_FROM_EMAIL} EMAILS_FROM_EMAIL: ${EMAILS_FROM_EMAIL}
POSTGRES_SERVER: db POSTGRES_SERVER: db
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_DB: ${POSTGRES_DB} POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER?Variable not set} POSTGRES_USER: ${POSTGRES_USER?Variable not set}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD?Variable not set} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD?Variable not set}
-2
View File
@@ -89,8 +89,6 @@ You can set several other environment variables:
* `SMTP_USER`: The SMTP server user to send emails. * `SMTP_USER`: The SMTP server user to send emails.
* `SMTP_PASSWORD`: The SMTP server password to send emails. * `SMTP_PASSWORD`: The SMTP server password to send emails.
* `EMAILS_FROM_EMAIL`: The email account to send emails from. * `EMAILS_FROM_EMAIL`: The email account to send emails from.
* `POSTGRES_SERVER`: The hostname of the PostgreSQL server. You can leave the default of `db`, provided by the same Docker Compose. You normally wouldn't need to change this unless you are using a third-party provider.
* `POSTGRES_PORT`: The port of the PostgreSQL server. You can leave the default. You normally wouldn't need to change this unless you are using a third-party provider.
* `POSTGRES_USER`: The Postgres user, you can leave the default. * `POSTGRES_USER`: The Postgres user, you can leave the default.
* `POSTGRES_DB`: The database name to use for this application. You can leave the default of `app`. * `POSTGRES_DB`: The database name to use for this application. You can leave the default of `app`.
* `SENTRY_DSN`: The DSN for Sentry, if you are using it. * `SENTRY_DSN`: The DSN for Sentry, if you are using it.