Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hysong4u authored Aug 21, 2024
1 parent 3c21ff9 commit 0ee5338
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,13 @@ jobs:
chmod 600 private_key.pem
ssh -T -o StrictHostKeyChecking=no -i private_key.pem ubuntu@$SERVER_ADDRESS << 'EOF'
docker pull hysong4u/com-us-server:latest
existing_container_id=$(sudo docker ps -q --filter "publish=8080")
[ -n "$existing_container_id" ] && sudo docker stop $existing_container_id && sudo docker rm $existing_container_id
docker run -d -p 8080:8080 hysong4u/com-us-server:latest
EOF
# docker 권한 문제 발생시
# sudo chmod 660 /var/run/docker.sock
# sudo /usr/sbin/usermod -aG docker $USER
# sudo /usr/sbin/usermod -aG docker ubuntu

0 comments on commit 0ee5338

Please sign in to comment.