chore: 清理大文件和部署配置

This commit is contained in:
爽哒哒
2026-03-19 00:56:19 +08:00
parent ef9057306c
commit 636ac24e70
4 changed files with 204 additions and 83 deletions

42
docker-compose.dev.yml Normal file
View File

@@ -0,0 +1,42 @@
# 本地开发模式 - 不使用 Docker 构建,直接挂载代码运行
version: '3.8'
services:
# 后端服务 - 使用本地 Python
scoring-backend:
image: python:3.12-slim
container_name: cywl-scoring-backend
working_dir: /app
volumes:
- ./backend:/app
ports:
- "8876:8876"
environment:
- DEBUG=True
- SECRET_KEY=local-dev-secret-key
- DB_NAME=scoring_system
- DB_USER=postgres
- DB_PASSWORD=password
- DB_HOST=host.docker.internal
- DB_PORT=5432
command: >
sh -c "pip install -r requirements.txt &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8876"
extra_hosts:
- "host.docker.internal:host-gateway"
# 前端服务 - 使用本地 Node
scoring-frontend:
image: node:20-alpine
container_name: cywl-scoring-frontend
working_dir: /app
volumes:
- ./frontend:/app
ports:
- "5173:5173"
environment:
- VITE_API_URL=http://localhost:8876/api
command: >
sh -c "npm install &&
npm run dev -- --host 0.0.0.0"