From 3f90249562f31ceae22ca887984a9c861735b7ef Mon Sep 17 00:00:00 2001 From: Rotimi Best Date: Thu, 20 Aug 2026 22:20:03 +0100 Subject: [PATCH] fix(ci): migrate postgres before jobs docker smoke test (#944) Jobs workers query analytics and media tables on boot. The smoke job uses an empty database, so the worker never logs all-workers-running and Publish Docker Images never pushes dashboard/api/jobs. Apply drizzle migrations first, matching what the API entrypoint already does. --- docker/smoke-test.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker/smoke-test.sh b/docker/smoke-test.sh index 43f321aa..6dcb3848 100644 --- a/docker/smoke-test.sh +++ b/docker/smoke-test.sh @@ -49,6 +49,15 @@ case "${SERVICE}" in ;; jobs) + # Workers query Postgres on boot (analytics rollups, media jobs, etc.). + # Apply schema first — this job has its own empty postgres, unlike api which + # runs db:setup in its entrypoint. + docker run --rm --network host \ + -e DATABASE_URL="${DB_URL}" -e PRIVATE_DATABASE_URL="${DB_URL}" \ + --entrypoint pnpm \ + "${IMAGE}" \ + --filter @cio/db db:migrate + docker run -d --name "${NAME}" --network host \ -e NODE_ENV=production -e DATABASE_URL="${DB_URL}" -e REDIS_URL="${REDIS_URL}" \ "${IMAGE}"