Initial commit: 浼佷笟寰俊 AI 鏈哄櫒浜哄姪鐞?MVP

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
bujie9527
2026-02-05 16:36:32 +08:00
commit 59275ed4dc
126 changed files with 9120 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
# 最小回调壳部署配置(仅 backend + nginx
# 用途:云端最小可用部署,用于企业微信回调联调
# 使用: docker-compose -f docker-compose.minimal.yml up -d
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
env_file: .env
environment:
# 数据库连接(可选,如果不需要数据库可以先注释)
# DATABASE_URL: postgresql+asyncpg://wecom:wecom_secret@db:5432/wecom_ai
# DATABASE_URL_SYNC: postgresql://wecom:wecom_secret@db:5432/wecom_ai
ports:
- "8000:8000"
# 最小回调壳不需要数据库依赖
# depends_on:
# db:
# condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
# 使用 HTTPS 配置(需要 SSL 证书)
- ./deploy/nginx-ssl.conf:/etc/nginx/nginx.conf:ro
# SSL 证书挂载Let's Encrypt
- /etc/letsencrypt:/etc/letsencrypt:ro
depends_on:
- backend
restart: unless-stopped
# 数据库(可选,最小回调壳可以先不启用)
# db:
# image: postgres:16-alpine
# environment:
# POSTGRES_USER: wecom
# POSTGRES_PASSWORD: wecom_secret
# POSTGRES_DB: wecom_ai
# volumes:
# - pgdata:/var/lib/postgresql/data
# ports:
# - "5432:5432"
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -U wecom -d wecom_ai"]
# interval: 5s
# timeout: 5s
# retries: 5
# volumes:
# pgdata: