Skip to content

Commit

Permalink
Update server-action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
friendshipkim97 authored Aug 14, 2024
1 parent e33d397 commit 76c8d80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/server-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
if [ "$(sudo docker ps -q -f name=hana-server-blue)" ]; then
NEW_CONTAINER_NAME="hana-server-green"
OLD_CONTAINER_NAME="hana-server-blue"
PORT_MAPPING="8081:8080" # ๋ธ”๋ฃจ๊ฐ€ ํ™œ์„ฑํ™”๋œ ๊ฒฝ์šฐ 8081 ์‚ฌ์šฉ
PORT_MAPPING="8081:8081" # ๋ธ”๋ฃจ๊ฐ€ ํ™œ์„ฑํ™”๋œ ๊ฒฝ์šฐ 8081 ์‚ฌ์šฉ
TARGET_PORT="8081"
else
NEW_CONTAINER_NAME="hana-server-blue"
Expand All @@ -63,7 +63,7 @@ jobs:
fi
# ์ƒˆ๋กœ์šด ์ปจํ…Œ์ด๋„ˆ ์‹คํ–‰
sudo docker run -d -p $PORT_MAPPING --name $NEW_CONTAINER_NAME --network hana_network -v /home/ubuntu/logs:/logs rlawjddn5980/hana-server:latest
sudo docker run -d -p $PORT_MAPPING --name $NEW_CONTAINER_NAME --network hana_network -v /home/ubuntu/logs:/logs -e SERVER_PORT=$TARGET_PORT rlawjddn5980/hana-server:latest
sudo docker exec nginx sh -c 'sed -i "s/set \$service_ip .*/set \$service_ip \"'"$NEW_CONTAINER_NAME"'\";/" /etc/nginx/conf.d/service-url.inc; sed -i "s/set \$service_port .*/set \$service_port \"'"$TARGET_PORT"'\";/" /etc/nginx/conf.d/service-url.inc; nginx -s reload'
Expand Down

0 comments on commit 76c8d80

Please sign in to comment.