69 lines
2.1 KiB
YAML
69 lines
2.1 KiB
YAML
# =============================================================================
|
|
# DCTS (Distributed Computing TLUSTY/SYNSPEC) Docker Compose 容器集群部署编排
|
|
# =============================================================================
|
|
#
|
|
# 快速启动:
|
|
# 1. docker compose up -d --build
|
|
# 2. 访问 Dashboard 控制台: http://localhost:8090
|
|
#
|
|
# 拓展计算节点数量:
|
|
# docker compose up -d --scale dcts-node=3
|
|
#
|
|
# 停止集群:
|
|
# docker compose down
|
|
# =============================================================================
|
|
|
|
services:
|
|
# ─── 1. DCTS 主控/Web 节点 (Server + Dashboard) ─────────────────────────────
|
|
server:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.server
|
|
image: dcts-server:latest
|
|
container_name: dcts-server
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${DCTS_PORT:-8090}:8090"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- DCTS_PORT=8090
|
|
- DCTS_DB_PATH=/app/data/dcts.db
|
|
- DCTS_QUEUE_DB_PATH=/app/data/dcts_queue.db
|
|
- DCTS_RESULTS_DIR=/app/data/results
|
|
- DCTS_ASSETS_DIR=/app/assets
|
|
- DCTS_LOG=info,server=debug
|
|
volumes:
|
|
- ./assets:/app/assets:ro
|
|
- ./data:/app/data
|
|
- ./logs/server:/app/logs
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8090/api/status"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
# ─── 2. DCTS Fortran 计算 Worker 节点 ──────────────────────────────────────
|
|
node:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.node
|
|
image: dcts-node:latest
|
|
restart: unless-stopped
|
|
depends_on:
|
|
server:
|
|
condition: service_healthy
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- DCTS_NODE_ID=
|
|
- DCTS_SERVER_URL=http://dcts-server:8090
|
|
- DCTS_MAX_SLOTS=4
|
|
- DCTS_HEARTBEAT_SEC=15
|
|
- DCTS_LOG=info,node=debug
|
|
volumes:
|
|
- ./assets:/app/assets:ro
|
|
- ./data/node_work:/app/data/work
|
|
- ./logs/node:/app/logs
|