fix: repair blue-green deployment architecture
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 54s
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 54s
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Deploy to OCIWP
|
name: Deploy to OCIWP
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -64,11 +64,18 @@ jobs:
|
|||||||
sleep 5
|
sleep 5
|
||||||
ACTIVE_PROFILE=dev docker compose up -d tool-payment-$TARGET
|
ACTIVE_PROFILE=dev docker compose up -d tool-payment-$TARGET
|
||||||
|
|
||||||
# 4.5. ?<3F>거??컨테?<3F>너 <20>?<3F><> (?<3F>트 충돌 방<EFBFBD>?, Nginx ?<3F>외)
|
# 4.5. 제거할 컨테이너 (포트 충돌 방지, Nginx 제외)
|
||||||
echo "Finding and killing legacy containers holding our ports..."
|
echo "Finding and killing legacy containers holding our ports..."
|
||||||
|
for port in 6379 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.6. Nginx 초기 ?<EFBFBD>정 <EFBFBD>?기동
|
# 4.6. Nginx 초기 ?정 ?기동
|
||||||
mkdir -p ./nginx/conf.d
|
mkdir -p ./nginx/conf.d
|
||||||
echo "Initializing Nginx config to $TARGET..."
|
echo "Initializing Nginx config to $TARGET..."
|
||||||
cp ./nginx/${TARGET}.conf ./nginx/conf.d/default.conf
|
cp ./nginx/${TARGET}.conf ./nginx/conf.d/default.conf
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ services:
|
|||||||
nginx:
|
nginx:
|
||||||
image: nginx:latest
|
image: nginx:latest
|
||||||
ports:
|
ports:
|
||||||
|
- "8281:8281"
|
||||||
- "8282:8282"
|
- "8282:8282"
|
||||||
- "8283:8283"
|
- "8283:8283"
|
||||||
- "8284:8284"
|
- "8284:8284"
|
||||||
@@ -172,8 +173,6 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: dap-gateway/Dockerfile
|
dockerfile: dap-gateway/Dockerfile
|
||||||
ports:
|
|
||||||
- "8281:8081"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/src
|
- ./:/src
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ server {
|
|||||||
listen 8281;
|
listen 8281;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
add_header Content-Type text/html;
|
proxy_pass http://gateway;
|
||||||
return 200 '<html><body><h1>Nginx Static Page</h1></body></html>';
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ server {
|
|||||||
listen 8281;
|
listen 8281;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
add_header Content-Type text/html;
|
proxy_pass http://gateway;
|
||||||
return 200 '<html><body><h1>Nginx Static Page</h1></body></html>';
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user