From a952d132703c2b379c447dcbed1ccf0a163efd77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EB=AF=B8=EB=9D=BC?= Date: Wed, 27 Nov 2024 17:39:51 +0900 Subject: [PATCH] refactor: Modify server deployment to use docker compose --- .github/workflows/server-ci-cd.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/server-ci-cd.yml b/.github/workflows/server-ci-cd.yml index f33c58d8..ddab48b6 100644 --- a/.github/workflows/server-ci-cd.yml +++ b/.github/workflows/server-ci-cd.yml @@ -74,11 +74,12 @@ jobs: username: mira key: ${{ secrets.SSH_PRIVATE_KEY }} script: | - echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - - docker pull ${{ secrets.DOCKERHUB_USERNAME }}/troublepainter:latest - - docker stop troublepainter || true - docker rm troublepainter || true - - docker run -d --name troublepainter -p 3000:3000 -e REDIS_HOST=${{ secrets.REDIS_HOST }} -e REDIS_PORT=${{ secrets.REDIS_PORT }} -e CLOVA_API_KEY=${{ secrets.CLOVA_API_KEY }} -e CLOVA_GATEWAY_KEY=${{ secrets.CLOVA_GATEWAY_KEY }} --restart unless-stopped ${{ secrets.DOCKERHUB_USERNAME }}/troublepainter:latest + cd /home/mira/web30-stop-troublepainter + git pull origin develop + + export REDIS_HOST=${{ secrets.REDIS_HOST }} + export REDIS_PORT=${{ secrets.REDIS_PORT }} + export CLOVA_API_KEY=${{ secrets.CLOVA_API_KEY }} + export CLOVA_GATEWAY_KEY=${{ secrets.CLOVA_GATEWAY_KEY }} + + docker compose up -d \ No newline at end of file