fix: start.sh 在 chown 之前 COPY(确保 nextjs 用户可读)
This commit is contained in:
+1
-2
@@ -37,6 +37,7 @@ COPY --from=builder /app/.next/standalone ./
|
|||||||
COPY --from=builder /app/.next/static ./.next/static
|
COPY --from=builder /app/.next/static ./.next/static
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY --from=builder /app/prisma ./prisma
|
COPY --from=builder /app/prisma ./prisma
|
||||||
|
COPY start.sh ./start.sh
|
||||||
|
|
||||||
# 数据库持久化目录
|
# 数据库持久化目录
|
||||||
RUN mkdir -p /app/prisma && chown -R nextjs:nodejs /app
|
RUN mkdir -p /app/prisma && chown -R nextjs:nodejs /app
|
||||||
@@ -46,6 +47,4 @@ EXPOSE 3000
|
|||||||
ENV PORT=3000
|
ENV PORT=3000
|
||||||
ENV HOSTNAME="0.0.0.0"
|
ENV HOSTNAME="0.0.0.0"
|
||||||
|
|
||||||
COPY start.sh ./start.sh
|
|
||||||
|
|
||||||
CMD ["sh", "./start.sh"]
|
CMD ["sh", "./start.sh"]
|
||||||
|
|||||||
Reference in New Issue
Block a user