services: go2rtc: image: alexxit/go2rtc ports: - "1984:1984" # WebUI and API # - "8554:8554" # RTSP - "8555:8555" # webrtc restart: unless-stopped environment: - TZ=${TZ:-UTC} server: build: context: ./server dockerfile: Dockerfile.dev ports: - "3000:3000" environment: - PORT=3000 - GO2RTC_WS_URL=ws://go2rtc:1984 - GO2RTC_API_URL=http://go2rtc:1984 - DATA_DIR=/data # Trust the Vite dev server for Websocket connections (CORS). Set # WS_ALLOWED_ORIGINS in a local .env to add your own origins. - WS_ALLOWED_ORIGINS=${WS_ALLOWED_ORIGINS:-http://localhost:5173} volumes: - ./server:/app/server - ./docker/data:/data - go-build-cache:/root/.cache/go-build - go-mod-cache:/go/pkg/mod depends_on: - go2rtc web: build: context: . dockerfile: Dockerfile.dev command: pnpm dev --host 0.0.0.0 ports: - "5173:5173" environment: - NODE_ENV=development - API_PROXY_TARGET=http://server:3000/api volumes: - ./web:/app/web # Keep the container's Linux-built node_modules instead of the host's. - /app/web/node_modules depends_on: - server volumes: go-build-cache: go-mod-cache: