From 9c72da56f4b91fd23368c87f6bdd1f3e318cdf62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E4=B8=9C=E7=94=9F?= Date: Wed, 25 Feb 2026 19:33:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=B9=E9=BD=90=20no-whatever=20?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E8=BF=87=E7=9A=84=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 构建时 DATABASE_URL 改回相对路径 file:./template.db - COPY 从 prisma/template.db 取文件(Prisma 6 实际生成位置) --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ea4cdfa..9fa16e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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