# DoTouch.AI 本地演示环境(独立隔离,不干扰开发) # 用法:docker compose -f docker-compose.demo.yml up -d --build # 访问:API http://localhost:8081/v1/health | 演示账号 test-e2e@dotouch.ai / Test1234 services: demo-postgres: image: postgres:16-alpine container_name: demo-dotouch-postgres restart: unless-stopped environment: POSTGRES_USER: dotouch POSTGRES_PASSWORD: dotouch POSTGRES_DB: dotouch ports: - "5433:5432" volumes: - demo-pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U dotouch -d dotouch"] interval: 10s timeout: 5s retries: 5 demo-redis: image: redis:7-alpine container_name: demo-dotouch-redis restart: unless-stopped ports: - "6380:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 demo-mock-upstream: image: node:22-alpine container_name: demo-dotouch-mock restart: unless-stopped working_dir: /app volumes: - ./apps/api/scripts:/app command: node mock-upstream.mjs ports: - "19091:19090" demo-api: build: context: . dockerfile: Dockerfile.api container_name: demo-dotouch-api restart: unless-stopped environment: DATABASE_URL: postgresql://dotouch:dotouch@demo-postgres:5432/dotouch?schema=public REDIS_URL: redis://demo-redis:6379 JWT_SECRET: demo-secret-change-me JWT_EXPIRES_IN: 7d PORT: "8080" DASHSCOPE_BASE_URL: http://demo-mock-upstream:19090/v1 DASHSCOPE_API_KEY: mock-key PAYMENT_PROVIDER: mock depends_on: demo-postgres: condition: service_healthy demo-redis: condition: service_healthy demo-mock-upstream: condition: service_started ports: - "8081:8080" demo-web: build: context: . dockerfile: Dockerfile.web container_name: demo-dotouch-web restart: unless-stopped depends_on: - demo-api ports: - "3000:3000" volumes: demo-pgdata: