Files
xiaoxia-saas/infra/docker/compose.yml
T
Xiaoxia AI 94dd60108c refactor: 彻底迁移到阿里云 OSS 并重构基础设施
- 删除 MinIO 依赖,改用阿里云 OSS (oss2)
- 重写存储服务 storage.py(完全兼容原接口)
- 更新配置:config.py 改为 OSS_* 配置项
- 重构 Docker Compose:分离基础设施(infra.yml)和应用(compose.yml)
- 添加健康检查和自动重启配置
- 创建标准化部署脚本(init-server.sh + deploy.sh)
- 统一 Nginx 配置(主域名 api.xiaoxiajianji.com)
- 修复 Web Dockerfile 端口映射(80 not 3000)

服务器清理完成:
- 删除旧云控制台、监控系统、桌面版代码
- 删除 2.6GB 旧安装包
- 清理 Docker 缓存 2.5GB
- 磁盘使用率从 48% 降至 26%
2026-06-20 15:24:24 +08:00

60 lines
1.4 KiB
YAML

version: '3.8'
services:
api:
image: ${API_IMAGE:-xiaoxia-saas-api:dev}
build:
context: ../..
dockerfile: infra/docker/api.Dockerfile
container_name: xiaoxia-api-${ENV:-staging}
restart: unless-stopped
env_file:
- ../../.env
environment:
APP_ENV: ${APP_ENV:-staging}
ports:
- "${API_PORT:-8000}:8000"
networks:
- xiaoxia-net
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8000/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
worker:
image: ${WORKER_IMAGE:-xiaoxia-saas-worker:dev}
build:
context: ../..
dockerfile: infra/docker/worker.Dockerfile
container_name: xiaoxia-worker-${ENV:-staging}
restart: unless-stopped
env_file:
- ../../.env
environment:
APP_ENV: ${APP_ENV:-staging}
networks:
- xiaoxia-net
web:
image: ${WEB_IMAGE:-xiaoxia-saas-web:dev}
build:
context: ../..
dockerfile: infra/docker/web.Dockerfile
container_name: xiaoxia-web-${ENV:-staging}
restart: unless-stopped
ports:
- "${WEB_PORT:-3001}:80"
networks:
- xiaoxia-net
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:80"]
interval: 30s
timeout: 5s
retries: 3
networks:
xiaoxia-net:
external: true