chore: 初始版本提交 - 简化架构 + 轮询改造
- 移除 Motia Streams 实时通信,改用 3 秒轮询 - 简化前端代码,移除冗余组件 - 简化后端架构,准备 FastAPI 重构 - 更新 pixi.toml 环境配置 - 保留 bttoxin_digger_v5_repro 作为参考文档 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
68
docker/compose/docker-compose.traefik.yml
Normal file
68
docker/compose/docker-compose.traefik.yml
Normal file
@@ -0,0 +1,68 @@
|
||||
# Docker Compose configuration for BtToxin Pipeline with Traefik
|
||||
# This configuration removes the internal Nginx and lets Traefik handle routing
|
||||
# The container exposes port 8000 where FastAPI serves both API and frontend
|
||||
|
||||
services:
|
||||
bttoxin:
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: docker/dockerfiles/Dockerfile.traefik
|
||||
container_name: bttoxin-pipeline
|
||||
# No ports section - Traefik will handle routing via the container network
|
||||
volumes:
|
||||
- ../../jobs:/app/jobs
|
||||
environment:
|
||||
- JOBS_DIR=/app/jobs
|
||||
# No need for ROOT_PATH since Traefik handles the routing
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- traefik-network
|
||||
labels:
|
||||
# Enable Traefik for this container
|
||||
- "traefik.enable=true"
|
||||
|
||||
# HTTP Router (redirect to HTTPS)
|
||||
- "traefik.http.routers.bttoxin.rule=Host(`bttiaw.hzau.edu.cn`)"
|
||||
- "traefik.http.routers.bttoxin.entrypoints=web"
|
||||
- "traefik.http.routers.bttoxin.middlewares=redirect-to-https"
|
||||
|
||||
# HTTPS Router
|
||||
- "traefik.http.routers.bttoxin-secure.rule=Host(`bttiaw.hzau.edu.cn`)"
|
||||
- "traefik.http.routers.bttoxin-secure.entrypoints=websecure"
|
||||
- "traefik.http.routers.bttoxin-secure.tls=true"
|
||||
|
||||
# Service configuration
|
||||
- "traefik.http.services.bttoxin.loadbalancer.server.port=8000"
|
||||
|
||||
# TLS redirect middleware
|
||||
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
||||
- "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
|
||||
|
||||
networks:
|
||||
traefik-network:
|
||||
external: true
|
||||
# Create this network first: docker network create traefik-network
|
||||
# Or set external: false to let docker-compose create it
|
||||
|
||||
# Example Traefik configuration (traefik.yml):
|
||||
#
|
||||
# services:
|
||||
# traefik:
|
||||
# image: traefik:v2.10
|
||||
# command:
|
||||
# - "--api.insecure=true"
|
||||
# - "--providers.docker=true"
|
||||
# - "--providers.docker.exposedbydefault=false"
|
||||
# - "--entrypoints.web.address=:80"
|
||||
# - "--entrypoints.websecure.address=:443"
|
||||
# ports:
|
||||
# - "80:80"
|
||||
# - "443:443"
|
||||
# - "8080:8080" # Traefik dashboard
|
||||
# volumes:
|
||||
# - "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
# networks:
|
||||
# - traefik-network
|
||||
#
|
||||
# networks:
|
||||
# traefik-network:
|
||||
Reference in New Issue
Block a user