Skip to content

Commit

Permalink
fix: HOST, PORT 이용하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
flydog98 committed Dec 18, 2023
1 parent d5e964b commit 8d49515
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/backend-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
password: ${{ secrets.BACKEND_SSH_PASSWORD }}
port: ${{ secrets.BACKEND_SSH_PORT }}
script: |
CURRENT_STATE=$(curl -s http://${{ secrets.NGINX_SSH_HOST }}:3000/status)
CURRENT_STATE=$(curl -s http://${{ secrets.BLUE_GREEN_HOST }}:${{ secrets.BLUE_GREEN_POST }}/status)
echo "The current state is $CURRENT_STATE"
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/git-challenge-backend:0.1
if [ $CURRENT_STATE = "blue" ]; then
Expand All @@ -84,7 +84,7 @@ jobs:
docker rm -f backend-blue || true
curl -X POST -H "Content-Type: application/json" \
-d '{"status":"green"}' \
http://${{ secrets.NGINX_SSH_HOST }}:3000/status
http://${{ secrets.BLUE_GREEN_HOST }}:${{ secrets.BLUE_GREEN_POST }}/status
else
docker run -d --name backend-blue -p 8080:8080 \
-v /${{ secrets.BACKEND_SSH_USERNAME }}/backend-logs:/app/packages/backend/logs/ \
Expand All @@ -100,7 +100,7 @@ jobs:
docker rm -f backend-green || true
curl -X POST -H "Content-Type: application/json" \
-d '{"status":"blue"}' \
http://${{ secrets.NGINX_SSH_HOST }}:3000/status
http://${{ secrets.BLUE_GREEN_HOST }}:${{ secrets.BLUE_GREEN_POST }}/status
fi
- name: Update NGINX Configuration
Expand Down

0 comments on commit 8d49515

Please sign in to comment.