-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·59 lines (48 loc) · 1.04 KB
/
run.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
59
#!/usr/bin/env bash
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
setup) #|--setup|-s
git stash
git pull --recurse-submodules
cd static && npm install
cd ./prebuilt
for f in * ; do
cp -r ./$f/* "../$f/dist/"
done
cd ..
cp ../configs/development/env/env ../.env
cd ..
cd api && npm install
cd ..
docker-compose pull
shift # past argument
;;
d|dev|development)
cp ./configs/development/env/env ./.env
docker-compose up
shift # past argument
;;
p-d|prod-debug|production-debug)
cp ~/env ./.env
docker-compose up
shift # past argument
;;
p|prod|production)
cp ~/env ./.env
docker-compose up -d
shift # past argument
;;
stop|down)
docker-compose down
shift # past argument
;;
r|restart)
docker-compose down
cp ~/env ./.env
docker-compose up -d
shift # past argument
;;
esac
done