Skip to content

Commit

Permalink
fix: Update cd.yml
Browse files Browse the repository at this point in the history
docker run 수행시, 인스턴스 서버 내에 있는 application.yml과 연결등 오류 해결
  • Loading branch information
kjungw1025 authored Nov 16, 2023
1 parent 954836b commit 803eb6e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ jobs:
env:
USERNAME: ${{ secrets.DOCKER_USERNAME }}
REPO: ${{ secrets.DOCKER_TABA_SPRINGBOOT_REPO }}
VOLUME: ${{ secrets.TABA_SPRINGBOOT_DOCKER_VOLUME }}
with:
host: ${{ secrets.TABA_SPRINGBOOT_SERVER_HOST }}
username: ubuntu
key: ${{ secrets.TABA4_PRIVATE_PEM_KEY }}
port: ${{ secrets.TABA_SPRINGBOOT_SERVER_PORT }}
envs: GITHUB_SHA,USERNAME,REPO
envs: GITHUB_SHA,USERNAME,REPO,VOLUME
script: |
docker pull $USERNAME/$REPO:${GITHUB_SHA::7}
docker tag $USERNAME/$REPO:${GITHUB_SHA::7} taba4-sb
docker stop server
docker run -it -d --rm --name server -p 80:8080 taba4-sb
docker stop $USERNAME/$REPO:${GITHUB_SHA::7}
docker run -it -d --rm -p 8081:8080 -v $VOLUME -e SPRING_CONFIG_LOCATION=/app/application.yml $USERNAME/$REPO:${GITHUB_SHA::7}

0 comments on commit 803eb6e

Please sign in to comment.