Files
market_intel/docker-compose.yml
T
2026-08-01 10:33:19 +08:00

57 lines
1.4 KiB
YAML

# 比特骆驼行情采集分析 — Docker Compose
# 用法: docker compose up -d --build
services:
collector:
build: .
image: market_intel:latest
container_name: mi_collector
command: ["python", "-m", "apps.collector.main"]
env_file: .env
environment:
TZ: Asia/Shanghai
MI_DB_PATH: /app/data/market_intel.db
volumes:
- mi_data:/app/data
restart: unless-stopped
api:
build: .
image: market_intel:latest
container_name: mi_api
command: ["uvicorn", "apps.api.main:app", "--host", "0.0.0.0", "--port", "5170"]
env_file: .env
environment:
TZ: Asia/Shanghai
MI_DB_PATH: /app/data/market_intel.db
ports:
- "${MI_PORT:-5170}:5170"
volumes:
- mi_data:/app/data
depends_on:
- collector
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:5170/health"]
interval: 15s
timeout: 5s
retries: 5
start_period: 20s
worker:
build: .
image: market_intel:latest
container_name: mi_worker
command: ["python", "-m", "apps.worker.main"]
env_file: .env
environment:
TZ: Asia/Shanghai
MI_DB_PATH: /app/data/market_intel.db
volumes:
- mi_data:/app/data
depends_on:
- collector
restart: unless-stopped
volumes:
mi_data: