refactor: 整理 Docker 配置文件(任务 2.2/20)

This commit is contained in:
张翔
2026-04-12 16:16:52 +08:00
parent f6b9031cd7
commit 1f52d47ed5
3 changed files with 90 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs
COPY dist/standalone/novalon-website/ ./
COPY dist/static ./dist/static
RUN chown -R nextjs:nodejs /app
USER nextjs
EXPOSE 3000
CMD ["node", "server.js"]