services: mysql: image: mysql:8.0 container_name: mentor-mysql restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: 22222222 MYSQL_DATABASE: mentor_system TZ: Asia/Shanghai volumes: - mysql_data:/var/lib/mysql - ./deploy/mysql/init:/docker-entrypoint-initdb.d ports: - "3306:3306" healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-p22222222"] interval: 10s timeout: 5s retries: 10 redis: image: redis:7-alpine container_name: mentor-redis restart: unless-stopped volumes: - redis_data:/data ports: - "6379:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 etcd: image: quay.io/coreos/etcd:v3.5.14 container_name: mentor-etcd restart: unless-stopped environment: - ETCD_AUTO_COMPACTION_MODE=revision - ETCD_AUTO_COMPACTION_RETENTION=1000 - ETCD_QUOTA_BACKEND_BYTES=4294967296 - ETCD_SNAPSHOT_COUNT=50000 volumes: - etcd_data:/etcd command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd healthcheck: test: ["CMD", "etcdctl", "endpoint", "health"] interval: 30s timeout: 20s retries: 3 minio: image: minio/minio:RELEASE.2023-03-20T20-16-18Z container_name: mentor-minio restart: unless-stopped environment: MINIO_ACCESS_KEY: minioadmin MINIO_SECRET_KEY: minioadmin volumes: - minio_data:/minio_data command: minio server /minio_data --console-address ":9001" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] interval: 30s timeout: 20s retries: 3 milvus: image: milvusdb/milvus:v2.5.1 container_name: mentor-milvus restart: unless-stopped command: ["milvus", "run", "standalone"] security_opt: - seccomp:unconfined environment: ETCD_ENDPOINTS: etcd:2379 MINIO_ADDRESS: minio:9000 volumes: - milvus_data:/var/lib/milvus ports: - "19530:19530" - "9091:9091" depends_on: etcd: condition: service_healthy minio: condition: service_healthy healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"] interval: 30s timeout: 20s retries: 10 start_period: 90s semantic: build: ./deploy/semantic-search container_name: mentor-semantic restart: unless-stopped environment: HF_ENDPOINT: https://hf-mirror.com volumes: - huggingface_cache:/root/.cache/huggingface ports: - "5050:5050" depends_on: milvus: condition: service_healthy healthcheck: test: ["CMD", "curl", "-f", "http://localhost:5050/health"] interval: 30s timeout: 10s retries: 5 start_period: 120s backend: build: ./backend container_name: mentor-backend restart: unless-stopped environment: SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/mentor_system?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true SPRING_DATASOURCE_USERNAME: root SPRING_DATASOURCE_PASSWORD: 22222222 SPRING_REDIS_HOST: redis SEMANTIC_SERVICE_URL: http://semantic:5050 LLM_API_KEY: ${LLM_API_KEY:-your_api_key_here} LLM_BASE_URL: ${LLM_BASE_URL:-https://openrouter.fans/v1/chat/completions} LLM_MODEL: ${LLM_MODEL:-deepseek-chat} APP_DOMAIN: ${APP_DOMAIN:-mentor.papervote.top} APP_BASE_URL: ${APP_BASE_URL:-http://mentor.papervote.top} ports: - "7020:7020" depends_on: mysql: condition: service_healthy redis: condition: service_healthy semantic: condition: service_healthy frontend: build: ./frontend container_name: mentor-frontend restart: unless-stopped ports: - "80:80" depends_on: - backend volumes: mysql_data: redis_data: etcd_data: minio_data: milvus_data: huggingface_cache: