Sphinx / Searchd: автозапуск супервизора не работает - PullRequest
0 голосов
/ 03 августа 2020

Мы запускаем sphinx через supervisord внутри docker. Мы пытаемся включить автозапуск, но он работает. Мы пытаемся проверить это, вручную прервав процесс searchd.

Ниже приведена конфигурация

[program:sphinx]
command=searchd --pidfile --config "config/sphinx.conf"
autostart=true
autorestart=unexpected
startsecs=5
startretries=3
exitcodes=0

Мы также пробовали другую конфигурацию

program:sphinx] 
command= rake ts:stop 
command= rake ts:configure
command= rake ts:start 
autostart=true 
exitcodes=0,2
autorestart=unexpected

Мы что-то упускаем ?

Dockerfile

FROM ruby:2.3
RUN apt-get update

#Install Sphinx

RUN wget -P /tmp http://sphinxsearch.com/files/sphinx-2.3.2-beta.tar.gz

RUN mkdir /opt/sphinx_src
RUN tar -xzvf /tmp/sphinx-2.3.2-beta.tar.gz -C /opt/sphinx_src
WORKDIR /opt/sphinx_src/sphinx-2.3.2-beta
RUN ./configure  --with-pgsql  --with-mysql
RUN make
RUN make install
RUN apt-get install -q -y supervisor cron
ADD  supervisor-cron.conf /etc/supervisor/conf.d/cron.conf
RUN service supervisor stop
RUN apt-get install -y net-tools telnet
WORKDIR /opt/app
ADD start.sh /usr/local/sbin/start
RUN chmod 755 /usr/local/sbin/start
EXPOSE 9312
CMD ["/usr/local/sbin/start"]

начало. sh

#! / Bin / sh

export set BUNDLE_GEMFILE=Gemfile
cd /opt/app
bundle install

echo "About to perform Sphinx Start"
cp /opt/app/supervisor-sphinx.conf /etc/supervisor/conf.d/sphinx.conf
supervisord -n
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...