From d73fd1bc85974182b1328615bac49ecdc5da9b32 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 | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0652c1d6..8d65734a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -47,7 +47,16 @@ 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_USER=${{ secrets.MYSQL_PROD_USER }} \ + -e MYSQL_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 }} \ No newline at end of file