Skip to content

Commit b6a1b7e

Browse files
authored
🔀 feature/#2 - 무중단배포 오류 수정
🔨 액티브 컬러 오류 수정
2 parents cb13f7f + 907f055 commit b6a1b7e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,15 @@ jobs:
128128
129129
echo "Current active app: $CURRENT"
130130
echo "Deploying next app: $NEXT"
131-
131+
132+
export ACTIVE_COLOR=$NEXT
133+
envsubst '${ACTIVE_COLOR}' < nginx.conf > nginx_final.conf
134+
mv nginx_final.conf nginx.conf
135+
132136
docker-compose pull app_${NEXT}
133137
docker-compose up -d app_${NEXT}
134138
135-
# nginx.conf 템플릿 복사 및 ACTIVE_COLOR 치환
136-
envsubst '${ACTIVE_COLOR} ${DOMAIN_NAME} ${SSL_CERTIFICATE} ${SSL_CERTIFICATE_KEY}' < ./configuration/nginx.conf.template > ./configuration/nginx.conf
137-
sed -i "s/\${ACTIVE_COLOR}/$NEXT/g" ./configuration/nginx.conf
138-
139-
docker cp ./configuration/nginx.conf nginx:/etc/nginx/nginx.conf
140-
docker exec nginx nginx -s reload
139+
docker exec prod-nginx-1 nginx -s reload # 설정 reload만 해줌
141140
142141
docker-compose stop app_${CURRENT}
143142

0 commit comments

Comments
 (0)