feat: 凭证生成、成本分析、AI问答、前端页面、集成测试与E2E测试
- 后端: 凭证生成引擎、金蝶导出器、凭证模板服务 - 后端: 成本分析服务、AI问答服务 - 后端: 科目映射CRUD API、分析API、QA API - 后端: 集成测试(认证/任务/凭证) 49个测试全部通过 - 前端: 凭证管理、成本分析、导出中心、知识库、系统设置页面 - 前端: AuthGuard认证守卫、Dashboard AI聊天功能 - 前端: Playwright E2E测试 16 passed, 1 skipped - 基础设施: Docker Compose、Nginx反向代理、.env.example - 文档: 用户手册、管理员手册、发布检查清单
This commit is contained in:
+69
-22
@@ -3,49 +3,96 @@ version: '3.8'
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
container_name: s2f-postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: s2f_db
|
||||
POSTGRES_USER: s2f_user
|
||||
POSTGRES_PASSWORD: s2f_password
|
||||
POSTGRES_DB: ${DB_NAME:-s2f_db}
|
||||
POSTGRES_USER: ${DB_USER:-s2f_user}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD:-s2f_password}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- "${DB_PORT:-5432}:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U s2f_user -d s2f_db"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-s2f_user} -d ${DB_NAME:-s2f_db}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: s2f-redis
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${REDIS_PORT:-6379}:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
build: ./backend
|
||||
environment:
|
||||
DATABASE_URL: postgresql+asyncpg://s2f_user:s2f_password@postgres:5432/s2f_db
|
||||
ALLOWED_ORIGINS: '["http://localhost:3000"]'
|
||||
DEBUG: "true"
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
- ./backend/uploads:/app/uploads
|
||||
container_name: s2f-backend
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
||||
|
||||
frontend:
|
||||
build: ./frontend
|
||||
redis:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
NEXT_PUBLIC_API_URL: http://localhost:8000
|
||||
DATABASE_URL: postgresql+asyncpg://${DB_USER:-s2f_user}:${DB_PASSWORD:-s2f_password}@postgres:5432/${DB_NAME:-s2f_db}
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
SECRET_KEY: ${SECRET_KEY:-change-me-in-production}
|
||||
JWT_SECRET_KEY: ${JWT_SECRET_KEY:-change-me-in-production}
|
||||
AI_PROVIDER: ${AI_PROVIDER:-zhipu}
|
||||
ZHIPU_API_KEY: ${ZHIPU_API_KEY:-}
|
||||
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
|
||||
OPENAI_MODEL: ${OPENAI_MODEL:-gpt-4-turbo-preview}
|
||||
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-http://localhost:3000}
|
||||
DEBUG: ${DEBUG:-false}
|
||||
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
||||
ports:
|
||||
- "${BACKEND_PORT:-8000}:8000"
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
- ./backend/uploads:/app/uploads
|
||||
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
args:
|
||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
|
||||
container_name: s2f-frontend
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- backend
|
||||
environment:
|
||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
|
||||
NEXT_PUBLIC_APP_NAME: "财务 AI 助手(薪财通 AI)"
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "${FRONTEND_PORT:-3000}:3000"
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- /app/node_modules
|
||||
- /app/.next
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: s2f-nginx
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- backend
|
||||
- frontend
|
||||
ports:
|
||||
- "${NGINX_PORT:-80}:80"
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
Reference in New Issue
Block a user