Files
billai/docker-compose.yaml
clz 9abd0d964f chore(release): v1.0.9 移除 Webhook 自动部署功能
- 删除 webhook/ 目录及相关文件
- 删除 deploy.sh 部署脚本
- 删除 WEBHOOK_SETUP.md 配置文档
- 更新 docker-compose.yaml 移除 webhook 服务
- 更新 README.md 和 CHANGELOG.md
2026-01-19 00:21:53 +08:00

128 lines
3.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
services:
# SvelteKit 前端服务
web:
build:
context: ./web
dockerfile: Dockerfile
container_name: billai-web
restart: unless-stopped
ports:
- "3000:3000"
environment:
NODE_ENV: production
HOST: "0.0.0.0"
PORT: "3000"
# SSR 服务端请求后端的地址Docker 内部网络)
API_URL: "http://server:8080"
depends_on:
server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
# Go 后端服务
server:
build:
context: ./server
dockerfile: Dockerfile
container_name: billai-server
restart: unless-stopped
ports:
- "8080:8080"
environment:
ANALYZER_URL: "http://analyzer:8001"
ANALYZER_MODE: "http"
MONGO_URI: "mongodb://admin:password@mongodb:27017"
MONGO_DATABASE: "billai"
# 认证配置
JWT_SECRET: "billai-secret-key-2026"
TOKEN_EXPIRY: "1" # Token 过期时间(小时)
# 管理员账号(如需覆盖配置文件中的用户,取消注释以下配置)
ADMIN_USERNAME: "admin"
ADMIN_PASSWORD: "admin123"
ADMIN_NAME: "管理员"
volumes:
- ./server/uploads:/app/server/uploads
- ./server/outputs:/app/server/outputs
depends_on:
analyzer:
condition: service_healthy
mongodb:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
# Python 分析服务 (FastAPI)
analyzer:
build:
context: ./analyzer
dockerfile: Dockerfile
container_name: billai-analyzer
restart: unless-stopped
ports:
- "8001:8001"
environment:
ANALYZER_HOST: "0.0.0.0"
ANALYZER_PORT: "8001"
volumes:
# 共享数据目录,用于访问上传的文件
- ./server/uploads:/app/server/uploads
- ./server/outputs:/app/server/outputs
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
mongodb:
image: mongo:8.0
container_name: billai-mongodb
restart: unless-stopped
ports:
- "27017:27017"
environment:
MONGO_INITDB_DATABASE: billai
# 如需认证,取消下面两行注释
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password
volumes:
- ./mongodata/db:/data/db
- ./mongodata/configdb:/data/configdb
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
default:
aliases:
- mongo
# 可选MongoDB 可视化管理工具
mongo-express:
image: mongo-express:latest
container_name: billai-mongo-express
restart: unless-stopped
ports:
- "8083:8081"
environment:
ME_CONFIG_MONGODB_SERVER: mongodb
ME_CONFIG_MONGODB_PORT: 27017
ME_CONFIG_BASICAUTH: "false"
# 如启用 MongoDB 认证,取消下面两行注释
ME_CONFIG_MONGODB_ADMINUSERNAME: admin
ME_CONFIG_MONGODB_ADMINPASSWORD: password
depends_on:
mongodb:
condition: service_healthy