diff --git a/Dockerfile b/Dockerfile index 3b8fb94..5ab9e36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 -ENV NODE_ENV production -ENV PORT 80 -ENV HOSTNAME "0.0.0.0" - -# Copy the pre-built standalone app from the build context -COPY build /app +# Copy the static export to nginx html directory +COPY build /usr/share/nginx/html EXPOSE 80 -CMD ["node", "server.js"] +CMD ["nginx", "-g", "daemon off;"]