Skip to content

Commit 29dbfe2

Browse files
authored
Merge pull request #67 from newsIntelligent/refactor/#58
Fix: 헬스체크 리밋 적용
2 parents 20bea29 + 9dde5ab commit 29dbfe2

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/cd-blue-green.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
host: ${{ secrets.EC2_SERVER_IP }}
3535
username: ${{ secrets.EC2_USERNAME }}
3636
key: ${{ secrets.EC2_PRIVATE_KEY }}
37+
command_timeout: 30m
3738
script: |
3839
mkdir -p ~/${{ secrets.REPOSITORY_PATH }}
3940
@@ -60,10 +61,14 @@ jobs:
6061
username: ${{ secrets.EC2_USERNAME }}
6162
key: ${{ secrets.EC2_PRIVATE_KEY }}
6263
envs: IMAGE_TAG,DOCKERHUB_USERNAME,DOCKERHUB_REPOSITORY,NGINX_API_CONF_TPL
64+
command_timeout: 30m
6365

6466
script: |
6567
set -eo pipefail
6668
cd ~/${{ secrets.REPOSITORY_PATH }}
69+
70+
71+
docker ps -q -f name=backend-app-1 | xargs -r docker rm -f || true
6772
6873
ACTIVE_PORT=$(grep -oE '127\.0\.0\.1:([0-9]+)' /etc/nginx/conf.d/api.newsintelligent.site.conf 2>/dev/null | tail -1 | cut -d: -f2 || echo 8081)
6974
if [ "$ACTIVE_PORT" = "8081" ]; then NEW_PORT=8082; else NEW_PORT=8081; fi

docker-compose-prod.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ services:
88
environment:
99
SPRING_PROFILES_ACTIVE: prod
1010
SERVER_HOST_FRONT: https://newsintelligent.site
11-
SPRING_AUTOCONFIGURE_EXCLUDE: org.springframework.boot.actuate.autoconfigure.metrics.SystemMetricsAutoConfiguration
11+
MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE: health,info
12+
MANAGEMENT_ENDPOINT_HEALTH_PROBES_ENABLED: "true"
13+
MANAGEMENT_METRICS_BINDERS_PROCESSOR_ENABLED: "false"
1214
SPRING_APPLICATION_JSON: >
13-
{"server":{"host":{"front":"${SERVER_HOST_FRONT}"}},
14-
"management":{"endpoint":{"health":{"probes":{"enabled":true}}},
15-
"endpoints":{"web":{"exposure":{"include":"health"}}}}}
15+
{"server":{"host":{"front":"${SERVER_HOST_FRONT}"}}}
1616
ports:
1717
- "${APP_PORT:-8081}:8080" # BLUE=8081 / GREEN=8082
1818
restart: always

0 commit comments

Comments
 (0)