-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
75 lines (56 loc) · 1.21 KB
/
entrypoint.sh
File metadata and controls
75 lines (56 loc) · 1.21 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
set -e
echo 'entrypoint start'
if [[ -d /abec.io ]]; then
rm -rf /abec.io
fi
if [[ -d /webBuild ]]; then
rm -rf /webBuild
fi
echo 'Setting up site'
mkdir /abec.io
if [[ ! -d /repo ]]; then
mkdir /repo
fi
cd /repo
doPull=0
if [[ ! -d ./.git ]]; then
echo "Cloning repo"
echo "[REMOVE]: $PROJECT_REPO"
git clone "$PROJECT_REPO" ./
else
doPull=1
fi
if [[ -n $REPO_BRANCH ]]; then
git checkout "$REPO_BRANCH"
fi
if [[ $doPull == 1 && $NO_PULL != true ]]; then
echo 'Pulling repo'
git pull
fi
echo 'Setting up webBuild script'
mkdir /webBuild
cp -r wsrc/ /webBuild/wsrc
cp package*.json /webBuild
cp tsconfig.json /webBuild
cp webpack.config.js /webBuild
cd /webBuild/
echo 'Running webBuild script'
/repo/buildWeb.sh
cd /repo
echo 'Copying src and webBuild'
cp -r base_site /abec.io
cp -r /webBuild/assets /abec.io
cp -r assets/* /abec.io/assets
cp -r static /abec.io
cp -r tools /abec.io
cp -r templates /abec.io
cp -r utils /abec.io
cp manage.py /abec.io
cp requirements.txt /abec.io
cd /abec.io
echo 'Installing requirements'
pip install --no-cache-dir --upgrade -r requirements.txt
echo ''
echo ''
echo '---> starting site' && python manage.py runserver 0.0.0.0:80 && echo '---> ended'