-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·28 lines (22 loc) · 771 Bytes
/
deploy.sh
File metadata and controls
executable file
·28 lines (22 loc) · 771 Bytes
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
#!/bin/bash
echo "[*] Deploying the CollaRE server ..."
# Ask for the CollaRE server name
echo "[?] What hostname will be used for the CollaRE (in format: google.com)?"
read domain
if grep -Fxq "HOSTNAME_PLACEHOLDER" ./conf.d/flaskapp.conf
then
cp ./conf.d/flaskapp.conf ./conf.d/flaskapp.conf.bak
sed -i.bak "s/HOSTNAME_PLACEHOLDER/$domain/g" ./conf.d/flaskapp.conf
else
cp ./conf.d/flaskapp.conf.bak ./conf.d/flaskapp.conf
sed -i.bak "s/HOSTNAME_PLACEHOLDER/$domain/g" ./conf.d/flaskapp.conf
fi
# Check if docker is running
docker info | grep 'Container' &> /dev/null
if [ $? != 0 ]; then
echo "[!] Docker is not running. Start Docker first"
exit 1
fi
echo -en "[*] Starting the services ... "
docker-compose up -d --build
echo "[*] Done :)"