fix: 对齐 no-whatever 验证过的 Dockerfile
- 构建时 DATABASE_URL 改回相对路径 file:./template.db - COPY 从 prisma/template.db 取文件(Prisma 6 实际生成位置)
This commit is contained in:
+2
-2
@@ -15,7 +15,7 @@ WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN npx prisma generate
|
||||
ENV DATABASE_URL="file:/app/template.db"
|
||||
ENV DATABASE_URL="file:./template.db"
|
||||
RUN npx prisma db push
|
||||
RUN npm run build
|
||||
|
||||
@@ -28,7 +28,7 @@ RUN adduser --system --uid 1001 nextjs
|
||||
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
COPY --from=builder /app/template.db ./template.db
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user