From 7dadd3ff40cc73e9d53e5978478ad74cbbad9df1 Mon Sep 17 00:00:00 2001 From: KimSongMok Date: Wed, 23 Oct 2024 22:31:31 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20cd=20yml=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0652c1d6..37b1cdf7 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -47,7 +47,17 @@ jobs: username: ubuntu key: ${{ secrets.EC2_SSH_KEY }} script: | - sudo docker pull kimsongmok/splanet:${{ env.IMAGE_TAG }} # 새 이미지 풀링 - sudo docker stop splanet || true # 기존 컨테이너 중지 - sudo docker rm splanet || true # 기존 컨테이너 제거 - sudo docker run -d --name splanet -p 80:8080 kimsongmok/splanet:${{ env.IMAGE_TAG }} # 새 컨테이너 실행 \ No newline at end of file + sudo docker pull kimsongmok/splanet:${{ env.IMAGE_TAG }} + sudo docker stop splanet || true + sudo docker rm splanet || true + sudo docker run -d --name splanet \ + -e MYSQL_PROD_URL=${{ secrets.MYSQL_PROD_URL }} \ + -e MYSQL_PROD_USER=${{ secrets.MYSQL_PROD_USER }} \ + -e MYSQL_PROD_PASSWORD=${{ secrets.MYSQL_PROD_PASSWORD }} \ + -e MYSQL_DATABASE=${{ secrets.MYSQL_DATABASE }} \ + -e CLIENT_ID=${{ secrets.CLIENT_ID }} \ + -e CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} \ + -e JWT_SECRET=${{ secrets.JWT_SECRET }} \ + -e REDIRECT_URL=${{ secrets.REDIRECT_URL }} \ + -p 80:8080 --restart unless-stopped kimsongmok/splanet:${{ env.IMAGE_TAG }}\ + -v ./src/main/resources/env.properties \ No newline at end of file