Files
s2f/docker-compose.yml
T
selfrelease 5278190750 feat: 凭证生成、成本分析、AI问答、前端页面、集成测试与E2E测试
- 后端: 凭证生成引擎、金蝶导出器、凭证模板服务
- 后端: 成本分析服务、AI问答服务
- 后端: 科目映射CRUD API、分析API、QA API
- 后端: 集成测试(认证/任务/凭证) 49个测试全部通过
- 前端: 凭证管理、成本分析、导出中心、知识库、系统设置页面
- 前端: AuthGuard认证守卫、Dashboard AI聊天功能
- 前端: Playwright E2E测试 16 passed, 1 skipped
- 基础设施: Docker Compose、Nginx反向代理、.env.example
- 文档: 用户手册、管理员手册、发布检查清单
2026-07-07 21:21:29 +08:00

98 lines
2.6 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.
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: s2f-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_NAME:-s2f_db}
POSTGRES_USER: ${DB_USER:-s2f_user}
POSTGRES_PASSWORD: ${DB_PASSWORD:-s2f_password}
ports:
- "${DB_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
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
container_name: s2f-backend
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
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:
- "${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:
redis_data: