feat(ci): add docker, docker compose

This commit is contained in:
2025-09-30 17:01:21 +08:00
parent 8094ab21b5
commit 431a247963
8 changed files with 109 additions and 4 deletions

View File

@@ -49,6 +49,16 @@ traveling-around-the-world/
> **注意**Leaflet 需要載入 CSS已在 `TravelMap` 中引入 `leaflet/dist/leaflet.css`)。
### Docker Compose 啟動
若想直接以容器方式啟動整個堆疊MongoDB + Node API + Nginx 前端):
1. 建立映像:`docker compose build`
2. 啟動服務:`docker compose up -d`
3. 前端:<http://localhost:3000>
4. API<http://localhost:4000>
> 預設前端仍採 LocalStorage。如果要改用 API 資料來源,請在 `client/src/app/App.tsx` 把 `VisitProvider mode="local"` 改成 `mode="api"`。
## 後端server
### 技術堆疊