You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a setup with Nextcloud in a docker container with fulltextsearch. As already mentioned in #436 and #534 new files and other entities will not be indexed after fulltextsearch:index with cron, even not with manual execution of php cron.php. To achieve this without cron, I used supervisor like described in https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/cron/apache/supervisord.conf to create an all-in-one self containing container which handles cron and fulltextsearch:live.
I believe others would like to use this to get an idea of how to handle fulltextsearch:live in a docker container, but I did not find a suitable place for this.
Here is my setup, improvement suggestions are welcome!
Dockerfile:
FROM nextcloud:23.0.1-apache
# Install tesseract and ocrmypdf for OCR# Install supervisor to start multiple processes on container startupRUN apt-get update \
&& apt-get install -y \
tesseract-ocr \
tesseract-ocr-deu \
tesseract-ocr-eng \
ocrmypdf \
supervisor \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN mkdir "/var/log/supervisord"RUN mkdir "/var/run/supervisord"COPY supervisord.conf /
COPY start_fulltextsearch_live.sh /
# The install and update script is only triggered when a default command is used (apache-foreground or php-fpm).# If you use a custom command you have to enable the install / update# See https://github.com/nextcloud/dockerENV NEXTCLOUD_UPDATE=1
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
start_fulltextsearch_live.sh
#!/bin/sh# Stop all running indexes
php /var/www/html/occ fulltextsearch:stop
# Start live index
php /var/www/html/occ fulltextsearch:live
# More information: https://github.com/nextcloud/fulltextsearch/wiki/Commands
supervisord.conf
; Inspired by https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/cron/apache/supervisord.conf
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisord/supervisord.log
pidfile=/var/run/supervisord/supervisord.pid
childlogdir=/var/log/supervisord/
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error
[program:apache2]
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
user=root
command=apache2-foreground ; Has to be the same command as CMD in original Dockerfile, see https://github.com/nextcloud/docker/blob/master/23/apache/Dockerfile#L158
[program:cron]
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
user=root
command=/cron.sh
[program:fulltextsearch_index_live]
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
user=www-data
command=/bin/sh /start_fulltextsearch_live.sh
The text was updated successfully, but these errors were encountered:
I created a setup with Nextcloud in a docker container with fulltextsearch. As already mentioned in #436 and #534 new files and other entities will not be indexed after
fulltextsearch:index
with cron, even not with manual execution ofphp cron.php
. To achieve this without cron, I usedsupervisor
like described in https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/cron/apache/supervisord.conf to create an all-in-one self containing container which handles cron andfulltextsearch:live
.I believe others would like to use this to get an idea of how to handle
fulltextsearch:live
in a docker container, but I did not find a suitable place for this.Here is my setup, improvement suggestions are welcome!
Dockerfile
:start_fulltextsearch_live.sh
supervisord.conf
The text was updated successfully, but these errors were encountered: