mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-10-06 13:36:10 +08:00
fix FTS
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
e9d9fb1ae6
commit
f8017a0a02
4 changed files with 14 additions and 19 deletions
|
@ -238,8 +238,7 @@ RUN set -ex; \
|
||||||
chmod +r /upgrade.exclude && \
|
chmod +r /upgrade.exclude && \
|
||||||
chmod +x /cron.sh && \
|
chmod +x /cron.sh && \
|
||||||
chmod +x /notify.sh && \
|
chmod +x /notify.sh && \
|
||||||
chmod +x /activate-collabora.sh && \
|
chmod +x /activate-collabora.sh
|
||||||
chmod +x /activate-fulltextsearch.sh
|
|
||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
mkdir /mnt/ncdata; \
|
mkdir /mnt/ncdata; \
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ "$FULLTEXTSEARCH_ENABLED" != yes ]; then
|
|
||||||
# Basically sleep for forever if fulltextsearch is not enabled
|
|
||||||
sleep inf
|
|
||||||
fi
|
|
||||||
echo "Activating fulltextsearch..."
|
|
||||||
php /var/www/html/occ fulltextsearch:live -q
|
|
||||||
sleep inf
|
|
|
@ -462,8 +462,20 @@ if [ "$FULLTEXTSEARCH_ENABLED" = 'yes' ]; then
|
||||||
php /var/www/html/occ app:update files_fulltextsearch
|
php /var/www/html/occ app:update files_fulltextsearch
|
||||||
fi
|
fi
|
||||||
php /var/www/html/occ fulltextsearch:configure '{"search_platform":"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform"}'
|
php /var/www/html/occ fulltextsearch:configure '{"search_platform":"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform"}'
|
||||||
php /var/www/html/occ fulltextsearch_elasticsearch:configure "{\"elastic_host\":\"http://$FULLTEXTSEARCH_HOST:9200\"}"
|
php /var/www/html/occ fulltextsearch_elasticsearch:configure "{\"elastic_host\":\"http://$FULLTEXTSEARCH_HOST:9200\",\"elastic_index\":\"nextcloud-aio\"}"
|
||||||
php /var/www/html/occ files_fulltextsearch:configure "{\"files_pdf\":\"1\",\"files_office\":\"1\"}"
|
php /var/www/html/occ files_fulltextsearch:configure "{\"files_pdf\":\"1\",\"files_office\":\"1\"}"
|
||||||
|
|
||||||
|
# Do the index
|
||||||
|
if ! [ -f "/mnt/ncdata/fts-index.done" ]; then
|
||||||
|
echo "Waiting 10s before activating FTS..."
|
||||||
|
sleep 10
|
||||||
|
echo "Activating fulltextsearch..."
|
||||||
|
if php /var/www/html/occ fulltextsearch:test && php /var/www/html/occ fulltextsearch:index; then
|
||||||
|
touch "/mnt/ncdata/fts-index.done"
|
||||||
|
else
|
||||||
|
echo "Fulltextsearch failed. Could not index."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
if [ -d "/var/www/html/custom_apps/fulltextsearch" ]; then
|
if [ -d "/var/www/html/custom_apps/fulltextsearch" ]; then
|
||||||
php /var/www/html/occ app:remove fulltextsearch
|
php /var/www/html/occ app:remove fulltextsearch
|
||||||
|
|
|
@ -35,10 +35,3 @@ stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/stderr
|
stderr_logfile=/dev/stderr
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
command=/activate-collabora.sh
|
command=/activate-collabora.sh
|
||||||
|
|
||||||
[program:activate-fulltextsearch]
|
|
||||||
stdout_logfile=/dev/stdout
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/stderr
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
command=/activate-fulltextsearch.sh
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue