fix: switch to nginx for static export serving (fixes 502)

This commit is contained in:
2026-07-13 19:12:25 +05:30
parent c816e4710f
commit d8083177ce

View File

@@ -1,15 +1,11 @@
FROM node:18-alpine FROM nginx:alpine
WORKDIR /app # Copy custom nginx config
COPY nginx.conf /etc/nginx/nginx.conf
# Next.js standalone config and environment # Copy the static export to nginx html directory
ENV NODE_ENV production COPY build /usr/share/nginx/html
ENV PORT 80
ENV HOSTNAME "0.0.0.0"
# Copy the pre-built standalone app from the build context
COPY build /app
EXPOSE 80 EXPOSE 80
CMD ["node", "server.js"] CMD ["nginx", "-g", "daemon off;"]