x-ad-service: &ad-service image: registry.cn-hangzhou.aliyuncs.com/stuuudy/ad-put-agent:${VERSION:-latest} env_file: - ${AD_RUNTIME_ENV_FILE:-.env} environment: TZ: ${TZ:-Asia/Shanghai} PYTHONPATH: /app:/app/examples/auto_put_ad_mini:/app/examples/tencent_realtime_control volumes: - ./examples/auto_put_ad_mini/outputs:/app/examples/auto_put_ad_mini/outputs - ./examples/tencent_realtime_control/outputs:/app/examples/tencent_realtime_control/outputs networks: - ad_network restart: unless-stopped services: ad_control_service: <<: *ad-service build: context: . dockerfile: Dockerfile.auto_put_ad_mini container_name: ad-control-service command: - python - /app/examples/tencent_realtime_control/run_control_service.py healthcheck: test: - CMD - python - -c - "from pathlib import Path; raise SystemExit(0 if b'run_control_service.py' in Path('/proc/1/cmdline').read_bytes() else 1)" interval: 30s timeout: 5s retries: 3 start_period: 30s ad_daily_service: <<: *ad-service container_name: ad-daily-service command: - python - /app/examples/auto_put_ad_mini/run_daily_service.py healthcheck: test: - CMD - python - -c - "from pathlib import Path; raise SystemExit(0 if b'run_daily_service.py' in Path('/proc/1/cmdline').read_bytes() else 1)" interval: 30s timeout: 5s retries: 3 start_period: 30s networks: ad_network: driver: bridge