Skip to content

Commit 35c909b

Browse files
authored
Merge pull request #138 from umc-commit/fix/137-nginx
[FIX] nginx 설정 수정
2 parents a1876d5 + 1d12106 commit 35c909b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/cd.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,17 @@ jobs:
6868
if curl -s http://localhost:$TARGET_PORT/health | grep "ok" > /dev/null; then
6969
echo "✅ Health check passed. Switching traffic..."
7070
71-
# Nginx 심볼릭 링크 교체
72-
cp $TARGET_CONF /opt/app/nginx/default.conf
71+
# 심볼릭 링크 변경
72+
ln -sf $TARGET_CONF /opt/app/nginx/default.conf
73+
echo "🔁 Linked $TARGET_CONF to default.conf"
74+
75+
# 컨테이너 내부로 설정 파일 복사
76+
docker cp /opt/app/nginx/default.conf nginx-proxy:/etc/nginx/conf.d/default.conf
77+
echo "📄 Copied default.conf to nginx container"
78+
79+
# Nginx reload
7380
docker exec nginx-proxy nginx -s reload
81+
echo "🔄 Nginx config reloaded"
7482
7583
# 이전 컨테이너 제거
7684
if [ "$TARGET_COLOR" = "blue" ]; then

0 commit comments

Comments
 (0)