Skip to content

Commit 3fa4cdc

Browse files
author
nimuy99
committed
#141 Deploy: 컨테이너가 존재할 경우에만 재시작하도록 변경
1 parent fab2f34 commit 3fa4cdc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@ jobs:
7979
ssh -i private_key.pem -o StrictHostKeyChecking=no $EC2_USERNAME@$EC2_HOST "
8080
docker pull $DOCKER_USERNAME/$MY_APP:latest
8181
82-
docker-compose down || true
83-
84-
docker-compose up -d --remove-orphans
85-
docker image prune -f
82+
docker ps -q --filter 'name=$MY_APP' | grep -q . && docker restart $MY_APP || docker-compose up -d
8683
"
8784
8885
rm -f private_key.pem

0 commit comments

Comments
 (0)