fix: 改用 sqlite3 原生工具做 schema 同步,替代不可靠的 prisma CLI 方案
This commit is contained in:
+1
-4
@@ -25,6 +25,7 @@ RUN npm run build
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
RUN apk add --no-cache sqlite
|
||||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 nextjs
|
||||
|
||||
@@ -35,10 +36,6 @@ COPY --from=builder /app/prisma/template.db ./template.db
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
|
||||
# Prisma CLI + schema engine for automatic schema migration on startup
|
||||
COPY --from=builder /app/node_modules/prisma ./node_modules/prisma
|
||||
COPY --from=builder /app/node_modules/@prisma/engines ./node_modules/@prisma/engines
|
||||
|
||||
COPY docker-entrypoint.sh ./
|
||||
RUN chmod +x docker-entrypoint.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user