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:
|
||||
push:
|
||||
@@ -64,11 +64,18 @@ jobs:
|
||||
sleep 5
|
||||
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..."
|
||||
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
|
||||
echo "Initializing Nginx config to $TARGET..."
|
||||
cp ./nginx/${TARGET}.conf ./nginx/conf.d/default.conf
|
||||
|
||||
@@ -46,6 +46,7 @@ services:
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
ports:
|
||||
- "8281:8281"
|
||||
- "8282:8282"
|
||||
- "8283:8283"
|
||||
- "8284:8284"
|
||||
@@ -172,8 +173,6 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dap-gateway/Dockerfile
|
||||
ports:
|
||||
- "8281:8081"
|
||||
volumes:
|
||||
- ./:/src
|
||||
depends_on:
|
||||
|
||||
@@ -6,7 +6,9 @@ server {
|
||||
listen 8281;
|
||||
|
||||
location / {
|
||||
add_header Content-Type text/html;
|
||||
return 200 '<html><body><h1>Nginx Static Page</h1></body></html>';
|
||||
proxy_pass http://gateway;
|
||||
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;
|
||||
|
||||
location / {
|
||||
add_header Content-Type text/html;
|
||||
return 200 '<html><body><h1>Nginx Static Page</h1></body></html>';
|
||||
proxy_pass http://gateway;
|
||||
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