Files
QQuiz/docker-compose-single.yml
handsomezhuzhu 9a1a9d3247 refactor: remove legacy frontend code and implement new Next.js structure
- Deleted the old Register page and utility functions.
- Removed Tailwind CSS configuration and Vite configuration files.
- Added a new script for starting a single container with FastAPI and Next.js.
- Updated README to reflect the current status of the Next.js frontend.
- Implemented new login and registration API routes with improved error handling.
- Refactored frontend API calls to use the new proxy structure.
- Enhanced error handling in API response processing.
- Updated components to align with the new API endpoints and structure.
2026-04-17 21:15:06 +08:00

40 lines
1.1 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-compose -f docker-compose-single.yml up -d
services:
qquiz:
build:
context: .
dockerfile: Dockerfile
container_name: qquiz
ports:
- "8000:8000"
env_file:
- .env
environment:
# 数据库配置SQLite 默认,使用持久化卷)
- DATABASE_URL=sqlite+aiosqlite:////app/data/qquiz.db
- UPLOAD_DIR=/app/uploads
volumes:
# 持久化数据卷
- qquiz_data:/app/data # 数据库文件
- qquiz_uploads:/app/uploads # 上传文件
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import sys, urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=5); sys.exit(0)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
qquiz_data:
# Reuse the previous split-stack SQLite volume during migration.
name: qquiz_sqlite_data
qquiz_uploads:
# Reuse the previous split-stack uploads volume during migration.
name: qquiz_upload_files