| 1234567891011121314151617181920212223242526272829303132 |
- services:
- auto_put_ad_mini:
- build:
- context: ../.. # 从Agent根目录构建
- dockerfile: examples/auto_put_ad_mini/Dockerfile
- container_name: auto_put_ad_mini
- env_file:
- - .env
- environment:
- - TZ=Asia/Shanghai # 或 UTC
- - EXECUTION_ENABLED=false # 开发环境默认 false
- - WHITELIST_ENABLED=true
- ports:
- - "8080:8080" # 暴露FastAPI端口
- volumes:
- - ./outputs:/app/outputs # 持久化输出
- # 注意:单文件挂载有风险,如果文件不存在 Docker 会创建同名目录导致启动失败
- # 如需热更新配置,请确保 config.py 存在后再取消注释:
- # - ./config.py:/app/config.py
- networks:
- - ad_network
- restart: unless-stopped
- healthcheck:
- test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
- interval: 30s
- timeout: 10s
- retries: 3
- start_period: 40s
- networks:
- ad_network:
- driver: bridge
|