-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy.sh
executable file
·58 lines (43 loc) · 1.77 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
echo "### Starting the execution..."
sudo apt-get update
### 1) INSTALL GIT
sudo apt-get install git
### 2) INSTALL DOCKER
### https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
echo "### Installing modules ..."
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release \
net-tools
echo "### Adding Docker's GPG key ..."
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "### Setting up the Docker repository ..."
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# install docker engine
echo "### Installing docker engine ..."
sudo apt-get update
sudo apt-get install docker-ce=5:20.10.14~3-0~ubuntu-focal docker-ce-cli=5:20.10.14~3-0~ubuntu-focal containerd.io
# install docker-compose
echo "### 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
### 3) CLONE THE REPO
echo "### Cloning 'prosimos-docker' repo ..."
git clone https://github.com/AutomatedProcessImprovement/prosimos-docker.git
cd prosimos-docker
### 4) START THE SERVICES
echo "### Starting docker ..."
sudo service docker start
# run certbot (creation of the certificates)
# start the client
echo "### Starting client ..."
chmod +x init-letsencrypt.sh
sudo ./init-letsencrypt.sh
# start certbot (for checking the update of the certificates every 12 hours)
echo "### Starting certbot ..."
sudo docker-compose up -d certbot