chore: optimize Dockerfile by adding cache mount for pnpm installation to improve build performance
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 5s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 5s
This commit is contained in:
@@ -50,7 +50,8 @@ COPY --from=builder /app/prisma.config.ts ./prisma.config.ts
|
|||||||
|
|
||||||
# Install prisma CLI for migrations + better-sqlite3 (compile native module)
|
# Install prisma CLI for migrations + better-sqlite3 (compile native module)
|
||||||
ENV DATABASE_URL="file:/app/data/prod.db"
|
ENV DATABASE_URL="file:/app/data/prod.db"
|
||||||
RUN pnpm add prisma @prisma/client @prisma/adapter-better-sqlite3 better-sqlite3 dotenv && \
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
|
pnpm add prisma @prisma/client @prisma/adapter-better-sqlite3 better-sqlite3 dotenv && \
|
||||||
pnpm prisma generate
|
pnpm prisma generate
|
||||||
|
|
||||||
# Copy entrypoint script
|
# Copy entrypoint script
|
||||||
|
|||||||
Reference in New Issue
Block a user