mirror of
https://github.com/handsomezhuzhu/QQuiz.git
synced 2026-04-18 14:32:54 +00:00
- 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.
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
# ==================== 单容器部署配置 ====================
|
||
# 使用方法: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
|