Skip to content

ci: restore Backend Docker Image CI (fix the image instead of deleting the job)#974

Merged
ogazboiz merged 1 commit into
mainfrom
fix/restore-backend-docker-ci
Jul 1, 2026
Merged

ci: restore Backend Docker Image CI (fix the image instead of deleting the job)#974
ogazboiz merged 1 commit into
mainfrom
fix/restore-backend-docker-ci

Conversation

@ogazboiz

@ogazboiz ogazboiz commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What

Restores the Backend Docker Image CI job that #969 removed, and fixes the underlying image bug so the job actually passes, keeping deployment-image validation (image build + boot + prisma db push + healthcheck) rather than dropping that coverage.

Root cause

The job's Boot and Check Health step runs docker compose run backend npx -y prisma db push inside the backend container, which failed with Could not find Prisma Schema. #969 fixed the build and copied prisma/, but the schema's datasource db {} block has no inline url — under Prisma 7 the schema path and datasource url are read from prisma.config.ts, which was still missing from the runtime image.

Fix

  • backend/Dockerfile: also COPY prisma.config.ts ./ into the runner stage. dotenv is a runtime dependency so the config loads, and the datasource url resolves from DATABASE_URL (passed to the health check via -e).
  • .github/workflows/ci.yml: restore the backend-docker job verbatim.

Verification

This PR's CI runs the restored job end-to-end (build image → boot → prisma db push → healthcheck). It should pass; if it doesn't, the job stays failing-visible rather than silently absent.

#969 unblocked CI by deleting the Backend Docker Image CI job. Restore it and
fix the underlying image bug so it actually passes, keeping deployment-image
validation (build + boot + prisma db push + healthcheck).

The job's in-container 'prisma db push' failed with 'Could not find Prisma
Schema'. #969 already copies prisma/ into the runner, but the schema's
datasource block has no inline url, so under Prisma 7 the datasource url +
schema path come from prisma.config.ts, which was still missing from the image.
Copy prisma.config.ts into the runner stage (dotenv is a runtime dep so it
loads; DATABASE_URL is passed to the health check via -e).
@ogazboiz ogazboiz merged commit 2713c60 into main Jul 1, 2026
10 checks passed
This was referenced Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants