FROM node:20-alpine

WORKDIR /app

# Copy the standalone build output
COPY build/ ./

# Next.js standalone collects all needed node_modules during build,
# so no `npm install` is necessary here.

# Expose the port that server.js listens on
EXPOSE 80

ENV PORT=80
ENV HOSTNAME="0.0.0.0"
ENV NODE_ENV=production

CMD ["node", "server.js"]