Skip to content

Commit

Permalink
docs: docker workflow sudo 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
somin-jeong committed Apr 23, 2024
1 parent 5c87bd9 commit 91b57f3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ jobs:

- name: Docker build
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t app .
docker tag app ${{ secrets.DOCKER_USERNAME }}/conet:latest
docker push ${{ secrets.DOCKER_USERNAME }}/conet:latest
sudo docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
sudo docker build -t app .
sudo docker tag app ${{ secrets.DOCKER_USERNAME }}/conet:latest
sudo docker push ${{ secrets.DOCKER_USERNAME }}/conet:latest
- name: Deploy
uses: appleboy/ssh-action@master
Expand All @@ -70,8 +70,8 @@ jobs:
key: ${{ secrets.PRIVATE_KEY }} # pem 키
# 도커 작업
script: |
docker pull ${{ secrets.DOCKER_USERNAME }}/conet:latest
docker stop $(docker ps -a -q)
docker run -d --log-driver=syslog -p 9001:9000 ${{ secrets.DOCKER_USERNAME }}/conet:latest
docker rm $(docker ps --filter 'status=exited' -a -q)
docker image prune -a -f
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/conet:latest
sudo docker stop $(docker ps -a -q)
sudo docker run -d --log-driver=syslog -p 9001:9000 ${{ secrets.DOCKER_USERNAME }}/conet:latest
sudo docker rm $(docker ps --filter 'status=exited' -a -q)
sudo docker image prune -a -f

0 comments on commit 91b57f3

Please sign in to comment.