fix: revert ports and add zombie container cleanup to CI
Some checks failed
Deploy to OCIWP / deploy (push) Has been cancelled
Some checks failed
Deploy to OCIWP / deploy (push) Has been cancelled
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
redis:
|
||||
image: redis:latest
|
||||
ports:
|
||||
- "16379:6379"
|
||||
- "6379:6379"
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
@@ -30,12 +30,12 @@ services:
|
||||
- SPRING_DATA_REDIS_PORT=6379
|
||||
- AXHUB_SOURCE_DIR=/src
|
||||
- JAVA_TOOL_OPTIONS=-Xms64m -Xmx384m
|
||||
- SPRING_PROFILES_ACTIVE=dev
|
||||
- SPRING_PROFILES_ACTIVE=${ACTIVE_PROFILE:-local}
|
||||
|
||||
mci-mock:
|
||||
image: wiremock/wiremock:latest
|
||||
ports:
|
||||
- "18089:8080"
|
||||
- "8089:8080"
|
||||
volumes:
|
||||
- ./mci-mock:/home/wiremock
|
||||
|
||||
@@ -61,7 +61,7 @@ services:
|
||||
- GLOW_COMMUNICATION_EXTMCI_PORT=8080
|
||||
- GLOW_COMMUNICATION_EAI_HOMT=http://mci-mock
|
||||
- GLOW_COMMUNICATION_EAI_PORT=8080
|
||||
- SPRING_PROFILES_ACTIVE=dev
|
||||
- SPRING_PROFILES_ACTIVE=${ACTIVE_PROFILE:-local}
|
||||
|
||||
tool-email:
|
||||
build:
|
||||
@@ -84,7 +84,7 @@ services:
|
||||
- GLOW_COMMUNICATION_EXTMCI_PORT=8080
|
||||
- GLOW_COMMUNICATION_EAI_HOMT=http://mci-mock
|
||||
- GLOW_COMMUNICATION_EAI_PORT=8080
|
||||
- SPRING_PROFILES_ACTIVE=dev
|
||||
- SPRING_PROFILES_ACTIVE=${ACTIVE_PROFILE:-local}
|
||||
|
||||
tool-other:
|
||||
build:
|
||||
@@ -107,7 +107,7 @@ services:
|
||||
- GLOW_COMMUNICATION_EXTMCI_PORT=8080
|
||||
- GLOW_COMMUNICATION_EAI_HOMT=http://mci-mock
|
||||
- GLOW_COMMUNICATION_EAI_PORT=8080
|
||||
- SPRING_PROFILES_ACTIVE=dev
|
||||
- SPRING_PROFILES_ACTIVE=${ACTIVE_PROFILE:-local}
|
||||
|
||||
tool-payment:
|
||||
build:
|
||||
@@ -130,12 +130,12 @@ services:
|
||||
- GLOW_COMMUNICATION_EXTMCI_PORT=8080
|
||||
- GLOW_COMMUNICATION_EAI_HOMT=http://mci-mock
|
||||
- GLOW_COMMUNICATION_EAI_PORT=8080
|
||||
- SPRING_PROFILES_ACTIVE=dev
|
||||
- SPRING_PROFILES_ACTIVE=${ACTIVE_PROFILE:-local}
|
||||
|
||||
dozzle:
|
||||
image: amir20/dozzle:latest
|
||||
ports:
|
||||
- "18288:8080"
|
||||
- "8288:8080"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /home/ubuntu/app/ax_hub_mcp_tool:/app
|
||||
|
||||
Reference in New Issue
Block a user