deployer: blog-lab 서비스 배포 스크립트에 추가
rsync 대상, docker compose up, 헬스체크에 blog-lab 포함 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ cd "$SRC"
|
|||||||
# backend, travel-proxy, deployer, nginx, scripts, docker-compose.yml, .env 등
|
# backend, travel-proxy, deployer, nginx, scripts, docker-compose.yml, .env 등
|
||||||
RSYNC_EXCLUDES="--exclude .git --exclude __pycache__ --exclude *.pyc --exclude data/"
|
RSYNC_EXCLUDES="--exclude .git --exclude __pycache__ --exclude *.pyc --exclude data/"
|
||||||
|
|
||||||
for dir in backend travel-proxy deployer stock-lab music-lab nginx scripts; do
|
for dir in backend travel-proxy deployer stock-lab music-lab blog-lab nginx scripts; do
|
||||||
rsync -a --delete $RSYNC_EXCLUDES \
|
rsync -a --delete $RSYNC_EXCLUDES \
|
||||||
"$SRC/$dir/" "$DST/$dir/"
|
"$SRC/$dir/" "$DST/$dir/"
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ bash "$SRC/scripts/deploy-nas.sh"
|
|||||||
|
|
||||||
# ── 변경된 서비스만 재빌드 (deployer 제외 — 자기 자신을 재빌드하면 스크립트 중단됨) ──
|
# ── 변경된 서비스만 재빌드 (deployer 제외 — 자기 자신을 재빌드하면 스크립트 중단됨) ──
|
||||||
cd "$DST"
|
cd "$DST"
|
||||||
docker compose up -d --build backend travel-proxy stock-lab music-lab frontend
|
docker compose up -d --build backend travel-proxy stock-lab music-lab blog-lab frontend
|
||||||
docker exec lotto-frontend nginx -s reload 2>/dev/null || true
|
docker exec lotto-frontend nginx -s reload 2>/dev/null || true
|
||||||
|
|
||||||
# ── 배포 후 헬스체크 ──
|
# ── 배포 후 헬스체크 ──
|
||||||
@@ -61,7 +61,7 @@ sleep 5
|
|||||||
|
|
||||||
HEALTH_OK=true
|
HEALTH_OK=true
|
||||||
# 컨테이너 내부에서는 서비스명 + 내부포트(8000)로 접근
|
# 컨테이너 내부에서는 서비스명 + 내부포트(8000)로 접근
|
||||||
for endpoint in "http://backend:8000/health" "http://stock-lab:8000/health" "http://travel-proxy:8000/health" "http://music-lab:8000/health"; do
|
for endpoint in "http://backend:8000/health" "http://stock-lab:8000/health" "http://travel-proxy:8000/health" "http://music-lab:8000/health" "http://blog-lab:8000/health"; do
|
||||||
if ! curl -sf --max-time 10 --retry 2 --retry-delay 3 "$endpoint" > /dev/null 2>&1; then
|
if ! curl -sf --max-time 10 --retry 2 --retry-delay 3 "$endpoint" > /dev/null 2>&1; then
|
||||||
echo "HEALTH_FAIL: $endpoint"
|
echo "HEALTH_FAIL: $endpoint"
|
||||||
HEALTH_OK=false
|
HEALTH_OK=false
|
||||||
|
|||||||
Reference in New Issue
Block a user