fix: revert ports and add zombie container cleanup to CI
Some checks failed
Deploy to OCIWP / deploy (push) Has been cancelled

This commit is contained in:
jade
2026-07-24 00:22:20 +09:00
parent 260f59b143
commit b3bdaa2b28
2 changed files with 20 additions and 10 deletions

View File

@@ -40,10 +40,20 @@ jobs:
# 2. 빌드 결과 plain jar 아카이브 정리
find /app -name "*-plain.jar" -delete
# 3. 마운트된 /app 디렉토리로 이동하여 호스트의 도커 컴포즈 제어! (러너 자신을 파괴하지 않고 나머지 서비스만 안전하게 재생성)
# 3. 좀비 컨테이너 청소 (현재 우리가 쓸 포트를 점유 중인 옛날 컨테이너들만 정확히 색출해서 사살)
echo "Finding and killing zombie containers holding our ports..."
for port in 6379 8080 8089 8281 8282 8283 8284 8285 8288; do
cid=$(docker ps -q --filter "publish=$port")
if [ ! -z "$cid" ]; then
echo "Force killing container $cid using port $port"
docker rm -f $cid
fi
done
# 4. 마운트된 /app 디렉토리로 이동하여 호스트의 도커 컴포즈 제어!
cd /app
docker system prune -f
docker compose up -d --build gateway redis mci-mock dozzle tool-sms tool-email tool-other tool-payment
ACTIVE_PROFILE=dev docker compose up -d --build gateway redis mci-mock dozzle tool-sms tool-email tool-other tool-payment
# 4. 배포 후 대롱대롱 매달려 있는 가비지 이미지 자동 소거 청소!
docker image prune -f