Files
AI-Testing/docker-compose.yml
2026-04-12 17:56:12 +08:00

52 lines
1.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.
# 基础镜像走国内 Docker Hub 代理DaoCloud稳定性较好若失败可改为 docker.1ms.run/library
services:
db:
image: docker.m.daocloud.io/library/postgres:16-alpine
container_name: exam-helper-db
restart: unless-stopped
environment:
POSTGRES_DB: exam_helper
POSTGRES_USER: exam_user
POSTGRES_PASSWORD: exam_pass
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U exam_user -d exam_helper"]
interval: 5s
timeout: 5s
retries: 10
backend:
build:
context: ./backend
container_name: exam-helper-backend
restart: unless-stopped
environment:
DATABASE_URL: postgresql+psycopg://exam_user:exam_pass@db:5432/exam_helper
CORS_ORIGINS: http://localhost:5173
QWEN_API_KEY: ${QWEN_API_KEY:-}
QWEN_BASE_URL: ${QWEN_BASE_URL:-https://dashscope.aliyuncs.com/compatible-mode/v1}
QWEN_MODEL: ${QWEN_MODEL:-qwen-plus}
UPLOAD_DIR: /app/uploads
volumes:
- uploads_data:/app/uploads
depends_on:
db:
condition: service_healthy
ports:
- "8866:8000"
frontend:
build:
context: ./frontend
container_name: exam-helper-frontend
restart: unless-stopped
depends_on:
- backend
ports:
- "8173:80"
volumes:
postgres_data:
uploads_data: