refactor: separate migrations from API runtime
CI / backend-and-migrations (push) Canceled after 0s
CI / astro-build (push) Canceled after 0s
CI / dependency-audit (push) Canceled after 0s
CI / compose-e2e (push) Canceled after 0s

This commit is contained in:
ik
2026-09-12 16:02:19 +07:00
parent 868278fdba
commit 049f1ef30a
6 changed files with 44 additions and 7 deletions
+15 -1
View File
@@ -51,6 +51,8 @@ services:
depends_on:
db:
condition: service_healthy
migrate:
condition: service_completed_successfully
minio:
condition: service_healthy
ports:
@@ -61,6 +63,18 @@ services:
timeout: 3s
retries: 12
migrate:
build:
context: .
dockerfile: apps/api/Dockerfile
environment:
DATABASE_URL: postgresql+psycopg://rf4:rf4_local@db:5432/rf4_spotter
depends_on:
db:
condition: service_healthy
command: ["alembic", "upgrade", "head"]
restart: "no"
web:
build: ./apps/web
environment:
@@ -87,7 +101,7 @@ services:
depends_on:
db:
condition: service_healthy
command: ["sh", "-c", "alembic upgrade head && python -m app.cli import-records"]
command: ["python", "-m", "app.cli", "import-records"]
scheduler:
build: