♻️ Run database setup explicitly before startup (#2426)

## AI Disclaimer

Using Codex with gpt-5.6-sol. Reviewed manually.
This commit is contained in:
Sebastián Ramírez
2026-08-10 23:09:54 +02:00
committed by GitHub
parent 8893c6807a
commit 9d541082a3
13 changed files with 13 additions and 26 deletions
+1 -16
View File
@@ -53,10 +53,7 @@ services:
db:
condition: service_healthy
restart: true
prestart:
condition: service_completed_successfully
# The YAML anchor lets the prestart service reuse this environment mapping.
environment: &backend-environment
environment:
PROJECT_NAME: ${PROJECT_NAME:?Variable not set}
BACKEND_CORS_ORIGINS: ${BACKEND_CORS_ORIGINS:-}
SECRET_KEY: ${SECRET_KEY:?Variable not set}
@@ -92,17 +89,5 @@ services:
- traefik.http.routers.backend-http.rule=Host(`${DOMAIN:-localhost}`)
- traefik.http.routers.backend-http.entrypoints=http
prestart:
image: backend:latest
build:
context: .
dockerfile: backend/Dockerfile
depends_on:
db:
condition: service_healthy
restart: true
command: bash scripts/prestart.sh
environment: *backend-environment
volumes:
app-db-data: