2 Commits

Author SHA1 Message Date
kjs
851b247a5e Merge branch 'jskim-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node 2026-05-22 14:30:16 +09:00
kjs
61a9e8e4ed Update deployment script to handle container replacement more effectively
- Added a step to bring down existing containers before creating new ones to avoid issues with Docker's recreate path, specifically addressing a known bug with Docker Compose v1.29 and the latest Docker Engine.
- Ensured that the network and data are preserved during the down operation by using the `--remove-orphans` flag.

This change improves the reliability of the deployment process and prevents potential downtime during service updates.
2026-05-22 14:30:15 +09:00

View File

@@ -25,9 +25,14 @@ echo ""
echo "[2/4] Docker 이미지 빌드 (서비스 무중단)..."
docker-compose -f "$COMPOSE_FILE" build
# 변경된 컨테이너만 graceful 재생성 (이미지 해시 동일하면 건드리지 않음)
# 컨테이너 교체
# docker-compose v1.29 + 최신 Docker Engine 조합은 "재생성(recreate)" 경로에서
# 'KeyError: ContainerConfig' 로 실패한다. 기존 컨테이너를 먼저 내린 뒤 새로
# 생성하면 재생성 경로를 타지 않아 이 버그를 회피한다.
# (네트워크는 external, 데이터는 named volume 이라 down 으로 삭제되지 않음 → 보존)
echo ""
echo "[3/4] 컨테이너 교체..."
docker-compose -f "$COMPOSE_FILE" down --remove-orphans
docker-compose -f "$COMPOSE_FILE" up -d
# 오래된 이미지 정리 (서비스 복귀 후 후처리)