Skip to content

Commit

Permalink
refactor: Modify server deployment to use docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
유미라 authored and 유미라 committed Nov 27, 2024
1 parent 885eec2 commit a952d13
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/server-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a952d13

Please sign in to comment.