# SOC Chat Clone - Local Docker (lightweight) # 基础设施用 Azure 云服务,本地只运行 LangGraph Server + Frontend # # Usage: # make dev - 开发模式(热重载) # make prod - 生产模式 # make down - 停止 services: # ============================================================ # Backend - Development (hot reload, source mount) # ============================================================ langgraph-dev: container_name: soc-langgraph-dev profiles: ["dev"] build: context: ./langgraph dockerfile: Dockerfile.dev env_file: - ./langgraph/.env ports: - "2024:2024" volumes: - ./langgraph/src:/app/src:cached - ./langgraph/langgraph.json:/app/langgraph.json:ro - ./langgraph/index.html:/app/index.html:ro - ./langgraph/vite.config.ts:/app/vite.config.ts:ro - ./langgraph/tsconfig.json:/app/tsconfig.json:ro - ./langgraph/tsconfig.app.json:/app/tsconfig.app.json:ro - ./langgraph/tsconfig.node.json:/app/tsconfig.node.json:ro - ./langgraph/tailwind.config.js:/app/tailwind.config.js:ro healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:2024/ok || exit 1"] interval: 10s timeout: 5s retries: 15 start_period: 30s # ============================================================ # Backend - Production (optimized image) # ============================================================ langgraph-prod: container_name: soc-langgraph-prod profiles: ["prod"] build: context: ./langgraph dockerfile: Dockerfile.prod env_file: - ./langgraph/.env ports: - "2024:2024" healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:2024/ok || exit 1"] interval: 10s timeout: 5s retries: 15 start_period: 30s restart: unless-stopped # ============================================================ # Frontend - Development (Vite dev server with HMR) # ============================================================ frontend-dev: container_name: soc-frontend-dev profiles: ["dev"] build: context: ./langgraph dockerfile: Dockerfile.frontend.dev environment: - VITE_LANGGRAPH_URL=http://192.168.30.30:2024 ports: - "5173:5173" volumes: - ./langgraph/src:/app/src:cached - ./langgraph/index.html:/app/index.html:ro - ./langgraph/vite.config.ts:/app/vite.config.ts:ro - ./langgraph/tailwind.config.js:/app/tailwind.config.js:ro - ./langgraph/tsconfig.json:/app/tsconfig.json:ro - ./langgraph/tsconfig.app.json:/app/tsconfig.app.json:ro - ./langgraph/tsconfig.node.json:/app/tsconfig.node.json:ro healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:5173 || exit 1"] interval: 10s timeout: 5s retries: 10 start_period: 15s # ============================================================ # Frontend - Production (nginx + vite build) # ============================================================ frontend-prod: container_name: soc-frontend-prod profiles: ["prod"] build: context: ./langgraph dockerfile: Dockerfile.frontend.prod args: VITE_LANGGRAPH_URL: http://192.168.30.30:2024 ports: - "3000:3000" healthcheck: test: ["CMD-SHELL", "curl -sf http://localhost:3000 || exit 1"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped