services: content_scheduler: build: . image: knowledge-scheduler:latest working_dir: /app/content_indentify command: python3 worker.py environment: - TZ=${TZ:-Asia/Shanghai} - PYTHONPATH=/app - GEMINI_API_KEY=${GEMINI_API_KEY} - FEISHU_APP_ID=${FEISHU_APP_ID} - FEISHU_APP_SECRET=${FEISHU_APP_SECRET} - FEISHU_FILE_TOKEN=${FEISHU_FILE_TOKEN} - HTTP_PROXY=${HTTP_PROXY} - HTTPS_PROXY=${HTTPS_PROXY} - NO_PROXY=${NO_PROXY} volumes: - ./:/app restart: always # 仅在 Docker Swarm 模式下生效;在本地 docker compose 可通过 --scale 使用 deploy: replicas: 6 # structure_scheduler: # image: knowledge-scheduler:latest # container_name: structure-scheduler # working_dir: /app/structure # command: python3 multi_thread_scheduler.py # environment: # - TZ=${TZ:-Asia/Shanghai} # - PYTHONPATH=/app # - GEMINI_API_KEY=${GEMINI_API_KEY} # - FEISHU_APP_ID=${FEISHU_APP_ID} # - FEISHU_APP_SECRET=${FEISHU_APP_SECRET} # - FEISHU_FILE_TOKEN=${FEISHU_FILE_TOKEN} # - HTTP_PROXY=${HTTP_PROXY} # - HTTPS_PROXY=${HTTPS_PROXY} # - NO_PROXY=${NO_PROXY} # volumes: # - ./:/app # restart: always # depends_on: # - content_scheduler networks: default: name: knowledge-net