build(docker): add db:generate step before building
Ensure Prisma client and schemas are generated before building the application to prevent runtime errors
This commit is contained in:
@@ -35,6 +35,10 @@ RUN npm ci
|
|||||||
|
|
||||||
# Build the project
|
# Build the project
|
||||||
COPY --from=pruner /app/out/full/ .
|
COPY --from=pruner /app/out/full/ .
|
||||||
|
|
||||||
|
# Generate Prisma client and schemas before building
|
||||||
|
RUN npm run db:generate --workspace=@repo/db
|
||||||
|
|
||||||
RUN turbo run build --filter=api...
|
RUN turbo run build --filter=api...
|
||||||
|
|
||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ RUN npm ci
|
|||||||
|
|
||||||
# Build the project
|
# Build the project
|
||||||
COPY --from=pruner /app/out/full/ .
|
COPY --from=pruner /app/out/full/ .
|
||||||
|
|
||||||
|
# Generate Prisma client and schemas before building
|
||||||
|
RUN npm run db:generate --workspace=@repo/db
|
||||||
|
|
||||||
RUN turbo run build --filter=bot...
|
RUN turbo run build --filter=bot...
|
||||||
|
|
||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
|
|||||||
Reference in New Issue
Block a user