-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstartServer.sh
executable file
·46 lines (44 loc) · 1.14 KB
/
startServer.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
#!/bin/bash
echo "Start reloading the server, may the gods be with us"
echo
echo "--------------------------"
echo
echo "Running docker compose down"
sudo docker-compose down
echo
echo "--------------------------"
echo
echo "Undo all local changes"
git checkout -- .
echo
echo "--------------------------"
echo
echo "Getting the latest changes"
git pull --ff-only
echo
echo "--------------------------"
echo
echo "Change the port"
sed -i 's/8000:8000/8080:8000/g' docker-compose.yml
sed -i 's/3000:3000/443:3000/g' docker-compose.yml
echo
echo "--------------------------"
echo
echo "Change server address"
sed -i "s,http://localhost:8000,http://vmedu259.mtacloud.co.il:8080,g" frontend/src/index.js
echo
echo "--------------------------"
echo
echo "Change server address"
sed -i 's,env="local",env="prod",g' frontend/src/index.js
echo
echo "--------------------------"
echo
echo "Update send mail"
sed -i 's,SEND_EMAIL = False,SEND_EMAIL = True,g' backend/backend/settings.py
sed -i 's,PLACEHOLDER,$SADNA_PASS,g' backend/backend/settings.py
echo
echo "--------------------------"
echo
echo "The money time! lets start the server"
sudo docker-compose up -d