alphax/docker-compose.yml
2026-05-13 22:32:50 +08:00

47 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

services:
alphax-web:
build:
context: .
dockerfile: Dockerfile
image: alphax:local
container_name: alphax-web
restart: unless-stopped
env_file:
- .env
environment:
PORT: "8190"
ALPHAX_DB_PATH: "/app/data/altcoin_monitor.db"
command: ["web"]
ports:
- "8191:8190"
volumes:
- ./data:/app/data
- ./logs:/app/logs
- ./rules.yaml:/app/rules.yaml:ro
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8190/api/stats >/dev/null || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
alphax-scheduler:
image: alphax:local
container_name: alphax-scheduler
restart: unless-stopped
depends_on:
alphax-web:
condition: service_started
env_file:
- .env
environment:
# 默认 dry-run确保第一次 docker compose up 不会直接写库/推送。
# 验证无误后改成 0。
ALPHAX_SCHEDULER_DRY_RUN: "1"
ALPHAX_DB_PATH: "/app/data/altcoin_monitor.db"
command: ["scheduler"]
volumes:
- ./data:/app/data
- ./logs:/app/logs
- ./rules.yaml:/app/rules.yaml:ro