Files
codexautopool/docker-compose.yml

43 lines
1.3 KiB
YAML

# ===========================================
# Codex Pool - Docker Compose 配置
# ===========================================
# 使用方式:
# docker-compose up -d # 启动服务
# docker-compose logs -f # 查看日志
# docker-compose down # 停止服务
# ===========================================
services:
# ===========================================================================
# Codex Pool Application (前后端一体)
# ===========================================================================
codex-pool:
build:
context: .
dockerfile: Dockerfile
image: codex-pool:latest
container_name: codex-pool
restart: unless-stopped
ports:
- "${BIND_HOST:-0.0.0.0}:${PORT:-8848}:8848"
volumes:
# 数据持久化 (配置文件和数据库)
- ./data:/app/data
# Team-Reg 可执行文件 (需要 Linux 版本)
- ./backend/team-reg:/app/team-reg
environment:
- TZ=${TZ:-Asia/Shanghai}
- CONFIG_PATH=/app/data/config.json
networks:
- codex-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8848/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
codex-network:
driver: bridge