docker-compose.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. services:
  2. content_scheduler:
  3. build: .
  4. image: knowledge-scheduler:latest
  5. working_dir: /app/content_indentify
  6. command: python3 worker.py
  7. environment:
  8. - TZ=${TZ:-Asia/Shanghai}
  9. - PYTHONPATH=/app
  10. - GEMINI_API_KEY=${GEMINI_API_KEY}
  11. - FEISHU_APP_ID=${FEISHU_APP_ID}
  12. - FEISHU_APP_SECRET=${FEISHU_APP_SECRET}
  13. - FEISHU_FILE_TOKEN=${FEISHU_FILE_TOKEN}
  14. - HTTP_PROXY=${HTTP_PROXY}
  15. - HTTPS_PROXY=${HTTPS_PROXY}
  16. - NO_PROXY=${NO_PROXY}
  17. volumes:
  18. - ./:/app
  19. restart: always
  20. # 仅在 Docker Swarm 模式下生效;在本地 docker compose 可通过 --scale 使用
  21. deploy:
  22. replicas: 6
  23. # structure_scheduler:
  24. # image: knowledge-scheduler:latest
  25. # container_name: structure-scheduler
  26. # working_dir: /app/structure
  27. # command: python3 multi_thread_scheduler.py
  28. # environment:
  29. # - TZ=${TZ:-Asia/Shanghai}
  30. # - PYTHONPATH=/app
  31. # - GEMINI_API_KEY=${GEMINI_API_KEY}
  32. # - FEISHU_APP_ID=${FEISHU_APP_ID}
  33. # - FEISHU_APP_SECRET=${FEISHU_APP_SECRET}
  34. # - FEISHU_FILE_TOKEN=${FEISHU_FILE_TOKEN}
  35. # - HTTP_PROXY=${HTTP_PROXY}
  36. # - HTTPS_PROXY=${HTTPS_PROXY}
  37. # - NO_PROXY=${NO_PROXY}
  38. # volumes:
  39. # - ./:/app
  40. # restart: always
  41. # depends_on:
  42. # - content_scheduler
  43. networks:
  44. default:
  45. name: knowledge-net