Skip to content

Commit b75ddf1

Browse files
author
MartinMikita
committed
Changed sphinxsearch config path, added environment variables for default and max search count.
1 parent b123100 commit b75ddf1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ RUN apt-get -qq update && apt-get install -qq -y --no-install-recommends \
99
nginx \
1010
python \
1111
python-setuptools \
12-
python-shapely \
1312
python-pip \
1413
python-crypto \
1514
python-flask \
16-
python-shapely \
1715
python-pil \
1816
unixodbc \
1917
uwsgi \
@@ -29,15 +27,17 @@ RUN curl -s \
2927
&& mkdir -p /var/log/sphinx \
3028
&& mkdir -p /var/log/supervisord
3129

32-
COPY conf/sphinx/*.conf /etc/sphinx/
30+
COPY conf/sphinx/*.conf /etc/sphinxsearch/
3331
COPY conf/nginx/nginx.conf /etc/nginx/sites-available/default
3432
COPY supervisor/*.conf /etc/supervisor/conf.d/
3533
COPY supervisord.conf /etc/supervisor/supervisord.conf
3634
COPY web /usr/local/src/websearch
3735
COPY sample.tsv /
3836
COPY sphinx-reindex.sh /
3937

40-
ENV SPHINX_PORT 9312
38+
ENV SPHINX_PORT=9312 \
39+
SEARCH_MAX_COUNT=100 \
40+
SEARCH_DEFAULT_COUNT=20
4141

4242
EXPOSE 80
4343
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]

sphinx-reindex.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fi
88
# Index files, only if not exists
99
if [ ! -f /data/index/ind_name.spa ]; then
1010
mkdir -p /data/index/
11-
/usr/bin/indexer -c /etc/sphinx/sphinx.conf --rotate --all
11+
/usr/bin/indexer -c /etc/sphinxsearch/sphinx.conf --rotate --all
1212
fi
1313

1414
# Start sphinx job in supervisor

supervisor/sphinx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ redirect_stderr=true
77
priority=1
88

99
[program:sphinx]
10-
command=/usr/bin/searchd --nodetach -c /etc/sphinx/sphinx.conf
10+
command=/usr/bin/searchd --nodetach -c /etc/sphinxsearch/sphinx.conf
1111
autostart=false
1212
autorestart=true
1313
user=root

0 commit comments

Comments
 (0)