version: '3.8' services: nextjs: image: node:18-alpine container_name: nextjs-app working_dir: /app volumes: - ./:/app ports: - "3000:3000" command: sh -c "npm ci && npm run build && npm run start" restart: unless-stopped