services: # Production-equivalent: nginx serving Vite build web: build: . ports: - "8080:80" # Dev: Vite HMR with live reload dev: image: node:20-alpine working_dir: /app volumes: - .:/app - /app/node_modules ports: - "5173:5173" command: sh -c "npm install && npm run dev -- --host" profiles: ["dev"]