fix update build
This commit is contained in:
20
Dockerfile
20
Dockerfile
@@ -1,11 +1,17 @@
|
||||
FROM nginx:alpine
|
||||
FROM node:20-alpine
|
||||
|
||||
# Copy custom nginx config
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the static export to nginx html directory
|
||||
COPY build /usr/share/nginx/html
|
||||
# Next.js standalone runtime. Required because the contact form's Server
|
||||
# Action (sendEmail.ts, SMTP via nodemailer) needs a live Node process -
|
||||
# it cannot run under static/nginx serving.
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
ENV HOSTNAME=0.0.0.0
|
||||
|
||||
EXPOSE 80
|
||||
# Copy the standalone build artifact (server.js, .next/, public/)
|
||||
COPY build /app
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
Reference in New Issue
Block a user