v4.0.8: nginx no-cache·deck-favorites shim으로 배포/캐시 문제 수정

구 HTML·CDN immutable JS가 init 없이 남던 문제를 nginx 캐시 정책·shim·배포 검증으로 해결한다.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-23 16:24:19 +09:00
parent 72d73a54bd
commit eb4b35bccc
8 changed files with 100 additions and 20 deletions

View File

@@ -118,7 +118,29 @@ head -1 login.html # output.css?v= 버전 쿼리 포함 여부
`script/deck-favorites.js`는 `window.UaDeckFavorites.init`이 있어야 한다. 없으면 `git pull` 누락 또는 JS CDN 캐시다.
`nginx/default.conf`를 변경했다면 `docker compose -f docker-compose.prod.yml up -d --build uniare-web`으로 웹 컨테이너만 재빌드한다. HTML·`style/`·`script/`만 바뀐 경우 컨테이너 재시작은 필요 없다.
`nginx/default.conf`를 변경했다면 **반드시** 웹 컨테이너를 재생성한다 (볼륨 마운트 반영):
```bash
docker compose -f docker-compose.prod.yml up -d --build uniare-web
```
배포 검증 (NAS 프로젝트 폴더):
```bash
# 호스트 파일 — v4.0.8·shim 포함 여부
rg "4\.0\.8|deck-favorites-shim" deckHistory.html
# 컨테이너가 같은 파일을 보는지 (다르면 compose 경로/마운트 문제)
docker exec uniare-web rg "deck-favorites-shim|4\.0\.8" /usr/share/nginx/html/deckHistory.html
# Docker 직접 접속 (Cloudflare 우회) — 위와 같아야 함
curl -s http://127.0.0.1:44082/deckHistory.html | rg "deck-favorites-shim|4\.0\.8"
curl -s http://127.0.0.1:44082/script/deck-favorites.js | tail -1
```
호스트·컨테이너·`curl 127.0.0.1`은 최신인데 `https://uniare.sori.studio`만 구버전이면 **Cloudflare 캐시 Purge**가 필요하다.
HTML·`style/`·`script/`만 바뀐 경우 API 컨테이너 재시작은 필요 없다.
## 4. 전체 업데이트