# Dockerfile FROM node:23-alpine WORKDIR /app COPY package*.json ./ RUN npm install COPY . /app RUN npm run build EXPOSE 3002 CMD ["npm", "start"] # docker-compose.yml services: _nextjs: image: container_name: working_dir: /app ports: - "3000:3000" expose: - "3000" command: "npm start" environment: NODE_ENV: production env_file: - .env build: context: . dockerfile: Dockerfile # Make sure to replace with your project's name and ports with your preferred ports.