feat: add new file
This commit is contained in:
50
docker-compose.yml
Normal file
50
docker-compose.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
services:
|
||||
db:
|
||||
image: 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:
|
||||
- "8001:8000"
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
container_name: exam-helper-frontend
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- backend
|
||||
ports:
|
||||
- "5173:80"
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
uploads_data:
|
||||
Reference in New Issue
Block a user