| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- version: '3.8'
- services:
- # ----------------------------------------------------
- # Mihomo 多端口代理池微服务 (供其他服务及宿主机使用)
- # ----------------------------------------------------
- proxy:
- build: .
- image: coordinator:latest
- container_name: coordinator-proxy
- command: ["python3", "start_proxy.py", "-f", "config/mihomo_config.yaml"]
- restart: unless-stopped
- volumes:
- - ./config:/app/config
- - ./logs:/app/logs
- environment:
- - TZ=Asia/Shanghai
- - MIHOMO_BIN=/bin/mihomo
- - ALLOW_LAN=true
- ports:
- # 全局混杂端口 (Mixed-port)
- - "16000:16000"
- # 多节点独立端口池 (覆盖 proxies.yaml 中的所有独立出口端口)
- - "16001-16350:16001-16350"
- healthcheck:
- test: ["CMD", "python3", "start_proxy.py", "--check-health"]
- interval: 10s
- timeout: 5s
- retries: 3
- start_period: 5s
- deploy:
- resources:
- limits:
- cpus: '1.0'
- memory: 512M
- visa-sentinel:
- stop_grace_period: 30s
- build: .
- image: coordinator:latest
- container_name: coordinator-sentinel
- command: ["python3", "main.py", "sentinel"]
- restart: unless-stopped
- depends_on:
- proxy:
- condition: service_healthy
- shm_size: '2gb'
- volumes:
- - ./config:/app/config
- - ./logs:/app/logs
- - ./data:/app/data
- - ./plugins:/app/plugins
- environment:
- - TZ=Asia/Shanghai
- - DISPLAY=:99
- - CHROME_BIN=/opt/ungoogled-chromium/chrome
- - MIHOMO_BIN=/bin/mihomo
- - PROXY_HOST=proxy
- - NODE_ID=${NODE_ID:-jerry_win11_pc}
- deploy:
- resources:
- limits:
- cpus: '2.0'
- memory: 2G
- visa-booker:
- stop_grace_period: 30s
- build: .
- image: coordinator:latest
- container_name: coordinator-booker
- command: ["python3", "main.py", "booker"]
- restart: unless-stopped
- depends_on:
- proxy:
- condition: service_healthy
- shm_size: '2gb'
- volumes:
- - ./config:/app/config
- - ./logs:/app/logs
- - ./data:/app/data
- - ./plugins:/app/plugins
- environment:
- - TZ=Asia/Shanghai
- - DISPLAY=:99
- - CHROME_BIN=/opt/ungoogled-chromium/chrome
- - MIHOMO_BIN=/bin/mihomo
- - PROXY_HOST=proxy
- - NODE_ID=${NODE_ID:-jerry_win11_pc}
- deploy:
- resources:
- limits:
- cpus: '2.0'
- memory: 2G
- visa-standalone:
- stop_grace_period: 30s
- build: .
- image: coordinator:latest
- container_name: coordinator-standalone
- command: ["python3", "main.py", "standalone"]
- restart: unless-stopped
- depends_on:
- proxy:
- condition: service_healthy
- shm_size: '2gb'
- volumes:
- - ./config:/app/config
- - ./logs:/app/logs
- - ./data:/app/data
- - ./plugins:/app/plugins
- environment:
- - TZ=Asia/Shanghai
- - DISPLAY=:99
- - CHROME_BIN=/opt/ungoogled-chromium/chrome
- - MIHOMO_BIN=/bin/mihomo
- - PROXY_HOST=proxy
- - NODE_ID=${NODE_ID:-jerry_win11_pc}
- deploy:
- resources:
- limits:
- cpus: '2.0'
- memory: 2G
- visa-sweeper:
- build: .
- image: coordinator:latest
- container_name: coordinator-sweeper
- command: ["python3", "main_sweeper.py"]
- restart: unless-stopped
- volumes:
- - ./config:/app/config
- - ./data:/app/data
- - ./logs:/app/logs
- environment:
- - TZ=Asia/Shanghai
- - NODE_ID=${NODE_ID:-jerry_win11_pc}
- deploy:
- resources:
- limits:
- cpus: '0.2'
- memory: 256M
|