fix(deploy): 빌드 전 docker compose down으로 컨테이너 충돌 방지

신규 서비스 추가 시 기존 고아 컨테이너와 이름 충돌하는 문제 해결.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 21:55:03 +09:00
parent 1b368e9896
commit ce4f7b3ef6

View File

@@ -52,6 +52,9 @@ bash "$SRC/scripts/deploy-nas.sh"
# ── 변경된 서비스만 재빌드 (deployer 제외 — 자기 자신을 재빌드하면 스크립트 중단됨) ── # ── 변경된 서비스만 재빌드 (deployer 제외 — 자기 자신을 재빌드하면 스크립트 중단됨) ──
cd "$DST" cd "$DST"
# 이름 충돌 방지: 중지된/고아 컨테이너 정리 후 빌드
docker compose down --remove-orphans 2>/dev/null || true
docker compose up -d --build backend travel-proxy stock-lab music-lab blog-lab realestate-lab frontend docker compose up -d --build backend travel-proxy stock-lab music-lab blog-lab realestate-lab frontend
docker exec lotto-frontend nginx -s reload 2>/dev/null || true docker exec lotto-frontend nginx -s reload 2>/dev/null || true