-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
14 lines (13 loc) · 846 Bytes
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
SUGG_TXT=suggdict.txt
SPHINX_VAR=${SPHINX_VAR}
docker compose up -d db
docker compose run -ti --rm app initdb -f "/source" -t "/temp" --container-temp "/temp"
docker compose run --rm app create-addrobj-config -f idx_addrobj.conf -t "/temp" --container-temp "/temp" --sphinx-var="/var/lib/sphinxsearch"
docker compose run -ti --rm sphinx indexer idx_fias_addrobj -c /temp/idx_addrobj.conf --buildstops /temp/${SUGG_TXT} 200000 --buildfreqs
rm ./data/temp/idx_addrobj.conf
docker compose run -ti --rm app init-trigram -f ${SUGG_TXT} -t "/temp" --container-temp "/temp"
docker compose run -ti --rm app create-sphinx-config -f "/etc/sphinxsearch/sphinx.conf" --sphinx-var="/var/lib/sphinxsearch"
docker compose run -ti --rm sphinx indexer -c /etc/sphinxsearch/sphinx.conf --all --rotate
docker compose up -d sphinx
docker compose up -d app