Files
H3ConuMS-v2/docker-compose.yml
v6ole ec1d9860ff refactor: 移除本地前端容器,仅保留远程部署
本地前端因 Casdoor OAuth 回调固定指向 onu.dhdx.fun,无法完成
登录流程,没有实际用途。转为仅远程服务器部署。

本地服务器现仅需 2 容器:backend + celery-worker(含beat)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 14:36:03 +08:00

32 lines
882 B
YAML

services:
backend:
build: ./backend
ports:
- "8000:8000"
env_file:
- ./backend/.env
volumes:
- ./backend/logs:/app/logs
restart: unless-stopped
healthcheck:
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 15s
timeout: 10s
retries: 5
start_period: 40s
celery-worker:
build: ./backend
command: celery -A celery_worker.celery_app worker -B --loglevel=info -Q h3c_onu_ms --schedule=/tmp/celerybeat-schedule
env_file:
- ./backend/.env
volumes:
- ./backend/logs:/app/logs
restart: unless-stopped
depends_on:
backend:
condition: service_healthy
# frontend 仅在远程服务器部署,本地通过 docker-compose 不再启动
# 部署命令见 .claude/rules/07-remote-operations.md