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 |
8359cf69
|
Ondřej Váně
|
echo "---SETTING PERMISSIONS FOR 'solr' DIRECTORY---"
|
19 |
|
|
chmod -R 777 ./solr/core-configs
|
20 |
7460ae47
|
Ondřej Váně
|
|
21 |
ce7807df
|
Ondřej Váně
|
echo "---STOPPING ALL RUNNING CONTAINERS---"
|
22 |
|
|
docker container stop $(docker container ls -aq)
|
23 |
|
|
|
24 |
|
|
echo "---DELETING ALL RUNNING CONTAINERS---"
|
25 |
|
|
docker container rm $(docker container ls -aq)
|
26 |
|
|
|
27 |
8359cf69
|
Ondřej Váně
|
echo "---DELETING ALL IMAGES---"
|
28 |
|
|
docker image rm -f $(docker image ls -aq)
|
29 |
|
|
|
30 |
|
|
echo "---PULLING FULL TEXT SEARCH FROM DOCKER HUB---"
|
31 |
|
|
docker-compose pull
|
32 |
|
|
|
33 |
7460ae47
|
Ondřej Váně
|
echo "---STARTING CONTAINERS---"
|
34 |
ce7807df
|
Ondřej Váně
|
docker-compose up -d --no-build
|
35 |
7460ae47
|
Ondřej Váně
|
|
36 |
8359cf69
|
Ondřej Váně
|
echo "---ATTEMPT TO DELETE CORE WITH NAME 'files'---"
|
37 |
dc2e4328
|
Ondřej Váně
|
docker exec fulltextsearch-solr solr delete -c files
|
38 |
|
|
|
39 |
8359cf69
|
Ondřej Váně
|
echo "---ATTEMPT TO DELETE WITH NAME 'documents'---"
|
40 |
dc2e4328
|
Ondřej Váně
|
docker exec fulltextsearch-solr solr delete -c documents
|
41 |
|
|
|
42 |
|
|
echo "---CREATING CORE WITH NAME 'documents'---"
|
43 |
|
|
docker exec fulltextsearch-solr solr create -c documents
|
44 |
|
|
|
45 |
|
|
echo "---CREATING CORE WITH NAME 'files'---"
|
46 |
|
|
docker exec fulltextsearch-solr solr create -c files
|
47 |
|
|
|
48 |
ce7807df
|
Ondřej Váně
|
echo "---DELETING FAKE DIRS---"
|
49 |
|
|
cd be
|
50 |
|
|
rmdir fulltextsearch
|
51 |
|
|
cd ..
|
52 |
|
|
rmdir be
|
53 |
|
|
cd fe
|
54 |
|
|
rmdir fulltextsearch
|
55 |
|
|
cd ..
|
56 |
|
|
rmdir fe
|
57 |
|
|
|
58 |
|
|
echo "---SUCCESSFULLY FINISHED---"
|
59 |
50209ddb
|
Ondřej Váně
|
echo "---APP STARTED ON localhost:4200---"
|