File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments