Files
bttoxin-pipeline/docker/compose/docker-compose.yml
zly fe353fc0bc chore: 初始版本提交 - 简化架构 + 轮询改造
- 移除 Motia Streams 实时通信,改用 3 秒轮询
- 简化前端代码,移除冗余组件
- 简化后端架构,准备 FastAPI 重构
- 更新 pixi.toml 环境配置
- 保留 bttoxin_digger_v5_repro 作为参考文档

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-13 16:50:09 +08:00

75 lines
2.0 KiB
YAML

version: '3.8'
services:
# Production deployment (all-in-one container with Nginx reverse proxy)
bttoxin:
build:
context: ../..
dockerfile: docker/dockerfiles/Dockerfile
container_name: bttoxin-pipeline
ports:
- "80:80"
volumes:
- ../../jobs:/app/jobs
- ../nginx/default.conf:/etc/nginx/sites-available/default:ro
environment:
- JOBS_DIR=/app/jobs
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
# Development mode (source code mounted for hot reload)
bttoxin-dev:
image: ghcr.io/prefix-dev/pixi:latest
container_name: bttoxin-dev
ports:
- "5180:5173"
- "8010:8000"
volumes:
- ../..:/app
- ../../jobs:/app/jobs
working_dir: /app
environment:
- JOBS_DIR=/app/jobs
# Use relative path for dev (Vite proxy handles /api)
- VITE_API_BASE_URL=
command: >
bash -c "
mkdir -p /app/jobs &&
pixi shell-hook -e webbackend > /app/activate_backend.sh &&
echo 'exec uvicorn backend.app.main:app --reload --host 0.0.0.0 --port 8000 \"\$@\"' >> /app/activate_backend.sh &&
bash /app/activate_backend.sh &
sleep 5 &&
cd /app/frontend && pnpm dev --host --port 5173 &
wait
"
restart: unless-stopped
# Production with separate containers (if needed for scaling)
bttoxin-frontend:
image: nginx:alpine
container_name: bttoxin-frontend
ports:
- "8080:80"
volumes:
- ../../dist:/usr/share/nginx/html:ro
environment:
- NGINX_HOST=localhost
restart: unless-stopped
bttoxin-backend:
image: ghcr.io/prefix-dev/pixi:latest
container_name: bttoxin-backend
ports:
- "8000:8000"
volumes:
- ../../jobs:/app/jobs
working_dir: /app
environment:
- JOBS_DIR=/app/jobs
command: uvicorn web.backend.main:app --host 0.0.0.0 --port 8000
restart: unless-stopped