From 99d7c0978d0054e8e4a20fdc4175d1322e281ba0 Mon Sep 17 00:00:00 2001 From: Max Isom Date: Thu, 6 Jan 2022 14:26:37 -0600 Subject: [PATCH] Fix Prisma migrations in Docker images --- CHANGELOG.md | 2 ++ Dockerfile | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ded5e45..e3f2450 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Prisma client and migrations are no longer broken in built Docker images ## [0.3.0] - 2022-01-05 ### Changed diff --git a/Dockerfile b/Dockerfile index 7e080f8..d1310ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,10 @@ RUN yarn prisma generate && yarn build FROM base AS prod COPY --from=builder /usr/app/dist dist +COPY --from=builder /usr/app/schema.prisma . +COPY --from=builder /usr/app/migrations migrations + +RUN yarn prisma generate ENV DATA_DIR /data