Skip to content

Commit

Permalink
Changed sphinxsearch config path, added environment variables for def…
Browse files Browse the repository at this point in the history
…ault and max search count.
  • Loading branch information
MartinMikita committed May 25, 2016
1 parent b123100 commit b75ddf1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ RUN apt-get -qq update && apt-get install -qq -y --no-install-recommends \
nginx \
python \
python-setuptools \
python-shapely \
python-pip \
python-crypto \
python-flask \
python-shapely \
python-pil \
unixodbc \
uwsgi \
Expand All @@ -29,15 +27,17 @@ RUN curl -s \
&& mkdir -p /var/log/sphinx \
&& mkdir -p /var/log/supervisord

COPY conf/sphinx/*.conf /etc/sphinx/
COPY conf/sphinx/*.conf /etc/sphinxsearch/
COPY conf/nginx/nginx.conf /etc/nginx/sites-available/default
COPY supervisor/*.conf /etc/supervisor/conf.d/
COPY supervisord.conf /etc/supervisor/supervisord.conf
COPY web /usr/local/src/websearch
COPY sample.tsv /
COPY sphinx-reindex.sh /

ENV SPHINX_PORT 9312
ENV SPHINX_PORT=9312 \
SEARCH_MAX_COUNT=100 \
SEARCH_DEFAULT_COUNT=20

EXPOSE 80
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
2 changes: 1 addition & 1 deletion sphinx-reindex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi
# Index files, only if not exists
if [ ! -f /data/index/ind_name.spa ]; then
mkdir -p /data/index/
/usr/bin/indexer -c /etc/sphinx/sphinx.conf --rotate --all
/usr/bin/indexer -c /etc/sphinxsearch/sphinx.conf --rotate --all
fi

# Start sphinx job in supervisor
Expand Down
2 changes: 1 addition & 1 deletion supervisor/sphinx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ redirect_stderr=true
priority=1

[program:sphinx]
command=/usr/bin/searchd --nodetach -c /etc/sphinx/sphinx.conf
command=/usr/bin/searchd --nodetach -c /etc/sphinxsearch/sphinx.conf
autostart=false
autorestart=true
user=root
Expand Down

0 comments on commit b75ddf1

Please sign in to comment.