-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdeploy.sh
executable file
·45 lines (28 loc) · 926 Bytes
/
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
#!/bin/bash
## gets run on host server
echo "Downloading tag: $1"
wget https://github.com/devinit/ddw-analyst-ui/archive/v$1.zip
echo "Download complete"
unzip v$1.zip
rm -rf v$1.zip
mkdir -p ~/ddw-analyst-ui
rsync -a ddw-analyst-ui-$1/ ~/ddw-analyst-ui/ || exit
rm -rf ddw-analyst-ui-$1
cd ~/ddw-analyst-ui || exit
echo SITE_URL"="${SITE_URL} >> .env
echo SPOTLIGHTS_URL"="${SPOTLIGHTS_URL} >> .env
cp certbot_success.sh ./ssl
chmod +x ssl/certbot_success.sh
mkdir -p certbot_logs
echo "Building docker"
docker-compose build db
docker-compose build --no-cache web
docker-compose build nginx
docker-compose build rabbitmq
docker-compose build --no-cache celery
docker-compose build --no-cache spotlights
docker-compose down --remove-orphans
docker-compose up -d
docker-compose exec -T web python manage.py migrate
echo "Fetch CSV Files"
docker-compose exec -T web python manage.py update_csv_files --validate