Skip to content

fix: include prisma directory in production Docker image#33

Open
waspeer wants to merge 1 commit intoslopus:mainfrom
waspeer:fix/include-prisma-directory-in-production
Open

fix: include prisma directory in production Docker image#33
waspeer wants to merge 1 commit intoslopus:mainfrom
waspeer:fix/include-prisma-directory-in-production

Conversation

@waspeer
Copy link

@waspeer waspeer commented Feb 4, 2026

Problem

The Dockerfile was missing the prisma directory in the runtime stage, which prevented database migrations from running in production deployments.

Solution

This PR adds the missing COPY command to copy the prisma directory from the builder stage to the runner stage.

Impact

Without this fix, deployments fail with:

Error: Could not find Prisma Schema that is required for this command.

With this fix:

  • prisma migrate deploy works correctly in production
  • Database schema can be initialized properly
  • No manual workarounds needed

Changes

  • Added COPY --from=builder /app/prisma ./prisma to the runtime stage

Testing

Tested on Coolify deployment - migrations now run successfully without manual intervention.

The Dockerfile was missing the prisma directory in the runtime stage,
which prevented database migrations from running in production deployments.

This fix copies the prisma directory from the builder stage to the runner
stage, enabling prisma migrate deploy to work correctly.

Without this fix, deployments would fail with:
'Could not find Prisma Schema that is required for this command'

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
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.

1 participant