Skip to content

Commit

Permalink
Merge pull request #10 from bankids/feature/docker
Browse files Browse the repository at this point in the history
feat: docker ci/cd 4트
  • Loading branch information
9yujin authored Jun 30, 2022
2 parents b2974e5 + 74ad880 commit d8a1dee
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,5 @@ jobs:
username: ubuntu
key: ${{ secrets.DEV_KEY }}
script: |
sh /home/ubuntu/srv/bankids-client/config/scripts/deploy.sh
sudo docker pull sanbonai06/bankids-test:dev
29 changes: 29 additions & 0 deletions config/scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# Installing docker engine if not exists
if ! type docker > /dev/null
then
echo "docker does not exist"
echo "Start installing docker"
sudo apt-get update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install -y docker-ce
fi

# Installing docker-compose if not exists
if ! type docker-compose > /dev/null
then
echo "docker-compose does not exist"
echo "Start installing docker-compose"
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
fi


# # aws log setting
# sudo systemctl daemon-reload
# sudo service docker restart

0 comments on commit d8a1dee

Please sign in to comment.