Document git-based deployment workflow, drop scp instructions
This commit is contained in:
13
CLAUDE.md
13
CLAUDE.md
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
## 專案概觀
|
||||
|
||||
這是一個純前端的靜態網頁,用 Leaflet 在台灣地圖上顯示寶可夢(Pokémon GO)出沒點資料。沒有建置系統、沒有套件管理、沒有測試,也不是 git repo。
|
||||
這是一個純前端的靜態網頁,用 Leaflet 在台灣地圖上顯示寶可夢(Pokémon GO)出沒點資料。沒有建置系統、沒有套件管理、沒有測試。遠端 repo:`http://192.168.42.124:31337/timmy/pokemon`(Gitea,公開)。
|
||||
|
||||
整個專案只有三個真正的組件:
|
||||
- `index.html`:主畫面。fetch `spots.json` 後,為每筆資料在地圖上建立帶圖示的 marker 與 popup。
|
||||
@@ -56,15 +56,18 @@ CONCURRENCY=16 ./download_poke_imgs.sh 1 1025 # 自訂並行數
|
||||
|
||||
## 部署
|
||||
|
||||
生產機在 `192.168.42.104`,Caddy 服務根目錄為 `/opt/caddy/www/pokemon`。更新方式:
|
||||
生產機在 `192.168.42.104`,Caddy 服務根目錄為 `/opt/caddy/www/pokemon`。**一律透過 Gitea 推送,不再用 scp**:
|
||||
|
||||
```bash
|
||||
scp index.html 192.168.42.104:/opt/caddy/www/pokemon/index.html
|
||||
git add -u # 或指定檔案
|
||||
git commit -m "..."
|
||||
git -c http.extraheader="Authorization: token <TOKEN>" push
|
||||
```
|
||||
|
||||
(資料檔 `spots.json` 由其他流程寫入,別一起覆蓋。)
|
||||
生產機由其他流程(cron 或 webhook)從 Gitea 同步到 Caddy root。本機禁用 scp 直接覆蓋生產檔,避免跟 git 狀態分叉。
|
||||
|
||||
(資料檔 `spots.json` 由其他流程寫入生產機,不要在本地修改後推上去覆蓋;若要動它,確認流程。)
|
||||
|
||||
## 其他檔案
|
||||
|
||||
- `index.html_BACKUP_20251104153704`:手動時間戳備份。由於此專案不是 git repo,這類檔案是唯一的版本保險;**不要隨意刪除**,除非使用者明確要求。
|
||||
- `IV100.png`:為 100% IV 完美個體預留的標示圖(目前 `index.html` 尚未引用)。
|
||||
|
||||
Reference in New Issue
Block a user