services:
# Nginx service (use with: docker compose up nextjs-static-export --build)
nextjs-static-export:
build:
context: .
dockerfile: Dockerfile
image: nextjs-static-export-image
container_name: nextjs-static-export-container
environment:
NODE_ENV: production
ports:
- "8080:8080"
restart: unless-stopped
# Serve variant (use with: docker compose up nextjs-static-export-with-serve --build)
nextjs-static-export-with-serve:
build:
context: .
dockerfile: Dockerfile.serve
image: nextjs-static-export-serve-image
container_name: nextjs-static-export-serve-container
environment:
NODE_ENV: production
PORT: 3000
ports:
- "3000:3000"
restart: unless-stopped