services:
  web:
    image: nginx:alpine
    ports:
      - "8083:80"
    volumes:
      - ./nginx.dev.conf:/etc/nginx/conf.d/default.conf:ro
      - ./dist:/usr/share/nginx/html:ro
    restart: unless-stopped
    depends_on:
      - vite
    networks:
      - agora-network

  vite:
    image: node:22-alpine
    working_dir: /app
    # Use host node_modules so new dependencies are picked up after install.
    command: sh -c "npm install && npm run dev"
    volumes:
      - .:/app
    environment:
      - NODE_ENV=development
    networks:
      - agora-network
    restart: unless-stopped

networks:
  agora-network:
    driver: bridge
