fix:优化docker p配置

This commit is contained in:
Daniel
2026-03-02 14:23:36 +08:00
parent 36576592a2
commit 2d800094b1
13 changed files with 135 additions and 1 deletions

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

@@ -0,0 +1,13 @@
# 开发模式:挂载源码 + 热重载,代码更新后无需重新 build
# 使用: docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d
# 或: docker compose --profile dev up -d (需在 dev 服务加 profiles)
services:
api:
volumes:
- ./server:/app/server:ro
command: ["node", "--watch", "server/index.js"]
crawler:
volumes:
- ./crawler:/app
command: ["uvicorn", "realtime_conflict_service:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]