docker-compose.yml 819 B

1234567891011121314151617181920212223242526272829303132
  1. version: '3.8'
  2. services:
  3. auto_put_ad_mini:
  4. build:
  5. context: ../.. # 从Agent根目录构建
  6. dockerfile: examples/auto_put_ad_mini/Dockerfile
  7. container_name: auto_put_ad_mini
  8. env_file:
  9. - .env
  10. environment:
  11. - TZ=Asia/Shanghai # 或 UTC
  12. - EXECUTION_ENABLED=false # 开发环境默认 false
  13. - WHITELIST_ENABLED=true
  14. ports:
  15. - "8080:8080" # 暴露FastAPI端口
  16. volumes:
  17. - ./outputs:/app/outputs # 持久化输出
  18. - ./config.py:/app/config.py # 热更新配置(可选)
  19. networks:
  20. - ad_network
  21. restart: unless-stopped
  22. healthcheck:
  23. test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
  24. interval: 30s
  25. timeout: 10s
  26. retries: 3
  27. start_period: 10s
  28. networks:
  29. ad_network:
  30. driver: bridge