AriStockAI/docker-compose.yml
fanfpy aa09c92ad5 feat: 初始化智能选股分析系统微服务架构
添加核心微服务组件包括数据服务、量化服务、情绪分析服务等
实现基于Consul的服务发现和Traefik网关路由
包含Docker化部署方案和CI/CD Webhook支持
2025-06-21 15:40:19 +08:00

79 lines
1.8 KiB
YAML

version: '3.8'
services:
traefik:
image: traefik:v2.9
command:
- --entrypoints.web.address=:80
- --providers.consulcatalog=true
- --providers.consulcatalog.endpoint.address=consul:8500
- --api.dashboard=true
ports:
- "80:80"
volumes:
- ./traefik/traefik.yml:/etc/traefik/traefik.yml
- /var/run/docker.sock:/var/run/docker.sock
labels:
- "traefik.enable=true"
data-service:
build: ./services/data-service
labels:
- "traefik.enable=true"
- "traefik.http.routers.data.rule=PathPrefix(`/api/data`)"
expose:
- "8000"
quant-service:
build: ./services/quant-service
labels:
- "traefik.enable=true"
- "traefik.http.routers.quant.rule=PathPrefix(`/api/quant`)"
expose:
- "8001"
emotion-service:
build: ./services/emotion-service
labels:
- "traefik.enable=true"
- "traefik.http.routers.emotion.rule=PathPrefix(`/api/emotion`)"
expose:
- "8002"
recommend-service:
build: ./services/recommend-service
labels:
- "traefik.enable=true"
- "traefik.http.routers.recommend.rule=PathPrefix(`/api/recommend`)"
expose:
- "8003"
user-service:
build: ./services/user-service
labels:
- "traefik.enable=true"
- "traefik.http.routers.user.rule=PathPrefix(`/api/user`)"
expose:
- "8004"
frontend:
build: ./services/frontend
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=PathPrefix(`/`)"
expose:
- "80"
gitea-webhook:
build: ./gitea-webhook
ports:
- "5005:5005"
consul:
image: consul:1.15
ports:
- "8500:8500" # Consul Web UI
- "8600:8600/udp"
volumes:
- ./consul/config:/consul/config
command: "consul agent -dev -config-dir=/consul/config"