1 |
7460ae47
|
Ondřej Váně
|
#!/bin/bash
|
2 |
|
|
|
3 |
|
|
FILE=docker-compose.yml
|
4 |
|
|
|
5 |
|
|
if [ -f "$FILE" ]; then
|
6 |
|
|
echo "$FILE exist"
|
7 |
|
|
else
|
8 |
|
|
echo "$FILE does not exist"
|
9 |
|
|
exit
|
10 |
|
|
fi
|
11 |
|
|
|
12 |
ce7807df
|
Ondřej Váně
|
echo "---CREATING FAKE DIRS---"
|
13 |
|
|
mkdir be
|
14 |
|
|
mkdir ./be/fulltextsearch
|
15 |
|
|
mkdir fe
|
16 |
|
|
mkdir ./fe/fulltextsearch
|
17 |
|
|
|
18 |
4c69d78a
|
Ondřej Váně
|
echo "---DELETING ALL IMAGES---"
|
19 |
|
|
docker image rm -f $(docker image ls -aq)
|
20 |
|
|
|
21 |
7460ae47
|
Ondřej Váně
|
echo "---PULLING FULL TEXT SEARCH FROM DOCKER HUB---"
|
22 |
|
|
docker-compose pull
|
23 |
|
|
|
24 |
ce7807df
|
Ondřej Váně
|
echo "---STOPPING ALL RUNNING CONTAINERS---"
|
25 |
|
|
docker container stop $(docker container ls -aq)
|
26 |
|
|
|
27 |
|
|
echo "---DELETING ALL RUNNING CONTAINERS---"
|
28 |
|
|
docker container rm $(docker container ls -aq)
|
29 |
|
|
|
30 |
7460ae47
|
Ondřej Váně
|
echo "---STARTING CONTAINERS---"
|
31 |
ce7807df
|
Ondřej Váně
|
docker-compose up -d --no-build
|
32 |
7460ae47
|
Ondřej Váně
|
|
33 |
ce7807df
|
Ondřej Váně
|
echo "---DELETING FAKE DIRS---"
|
34 |
|
|
cd be
|
35 |
|
|
rmdir fulltextsearch
|
36 |
|
|
cd ..
|
37 |
|
|
rmdir be
|
38 |
|
|
cd fe
|
39 |
|
|
rmdir fulltextsearch
|
40 |
|
|
cd ..
|
41 |
|
|
rmdir fe
|
42 |
|
|
|
43 |
|
|
echo "---SUCCESSFULLY FINISHED---"
|
44 |
|
|
echo "---APP STARTED ON localhost:4200---"
|