Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/SSAFY-TOTT/TOTT
Browse files Browse the repository at this point in the history
  • Loading branch information
goldapple-ce committed Sep 11, 2023
2 parents 0b8dbed + af3cd31 commit df65e44
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/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.27.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
fi

echo "start submoudle update"
cd /home/ubuntu/srv/ubuntu
mkdir alertmanager
sudo git submodule init
sudo git submodule update --recursive --remote --merge
# sudo mv /home/ubuntu/srv/ubuntu/.env /home/ubuntu/srv/ubuntu/backend/
# echo "start docker-compose up: ubuntu"
# sudo docker-compose -f /home/ubuntu/srv/ubuntu/docker-compose.yml up --build -d

0 comments on commit df65e44

Please sign in to comment.