fix docker port
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -17,12 +17,10 @@ ENV NODE_ENV=production
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# Stage 3: Production runner with Nginx reverse proxy
|
||||
# Stage 3: Production runner with Next.js Standalone
|
||||
FROM node:22-alpine AS runner
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache nginx
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV PORT=3000
|
||||
@@ -33,10 +31,6 @@ COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
|
||||
# Copy custom Nginx configuration
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
EXPOSE 3000
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
# Start Next.js standalone server in background and Nginx in foreground
|
||||
CMD ["sh", "-c", "node server.js & nginx -g 'daemon off;'"]
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
Reference in New Issue
Block a user