Item | Value |
---|---|
Nextcloud | 31.0.4 |
MariaDB | 11.4 |
elasticsearch | 8.18.0 |
Collabora Office | 25.04.1.1 |
docker pull mariadb:11.4
docker pull nextcloud
docker run --rm --name nextcloud_mariadb --hostname mariadb --network nextcloud -e MYSQL_ROOT_PASSWORD=root1234 -e MYSQL_PASSWORD=nextcloud1234 -e MYSQL_DATABASE=nextcloud -e MYSQL_USER=nextcloud -d -v ./nextcloud_mariadb:/var/lib/mysql mariadb:11.4
docker run --rm --name nextcloud_main --hostname nextcloud --network nextcloud -p 1080:80 -d -v ./nextcloud:/var/www/html nextcloud
Item | Value |
---|---|
login | any |
password | any |
data folder | /var/www/html/data (default) |
database | MySQL/MariaDB |
database account | nextcloud |
database password | nextcloud1234 |
database name | nextcloud |
database hostname | mariadb:3306 |
- SOLR in Nextcloud 24? - ℹ️ Support - Nextcloud community
- nextcloud + Elasticsearch で日本語全文検索が動いたメモ #Docker - Qiita
Install following apps:
- Full text search - Apps
- Full text search - Elasticsearch Platform
- Full text search - Files
- Full text search - OCR
es_args=(--name nextcloud_elasticsearch --hostname elasticsearch --net nextcloud -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms6G -Xmx6G")
docker run --rm "${es_args[@]}" -dit elasticsearch:8.18.0 /bin/bash
docker cp nextcloud_elasticsearch:/usr/share/elasticsearch/config ./es/
docker cp nextcloud_elasticsearch:/usr/share/elasticsearch/data ./es/
docker cp nextcloud_elasticsearch:/usr/share/elasticsearch/plugins ./es/
docker stop nextcloud_elasticsearch
set volume bind args.
es_volume_args=(-v ./es/config:/usr/share/elasticsearch/config -v ./es/data:/usr/share/elasticsearch/data -v ./es/plugins:/usr/share/elasticsearch/plugins)
append following on es/config/elasticsearch.yml
xpack.security.enabled: false
xpack.security.http.ssl.enabled: false
xpack.security.transport.ssl.enabled: false
Do this afterward:
docker run --rm "${es_args[@]}" "${es_volume_args[@]}" -it elasticsearch:8.18.0 /bin/bash
bin/elasticsearch-keystore remove xpack.security.transport.ssl.keystore.secure_password
bin/elasticsearch-keystore remove xpack.security.transport.ssl.truststore.secure_password
bin/elasticsearch-keystore remove xpack.security.http.ssl.keystore.secure_password
docker run --rm "${es_args[@]}" "${es_volume_args[@]}" -it elasticsearch:8.18.0 /bin/bash
./bin/elasticsearch-plugin list
# check whether following plugins are already installed
./bin/elasticsearch-plugin install analysis-kuromoji
./bin/elasticsearch-plugin install analysis-icu
exit
# -p 9200:9200 -p 9300:9300
docker run -d --rm "${es_args[@]}" "${es_volume_args[@]}" elasticsearch:8.18.0
Full text search - Administration settings - Nextcloud
Item | Value |
---|---|
General / Search Platform | Elasticsearch |
Elastic Search / Servelet Address | http://elasticsearch:9200 |
Index | nextcloud (any) |
[Advanced] Analyzer Tokenizer | kuromoji_tokenizer |
Files - Tesseract OCR / Enable OCR | Yes |
Languages | ja,eng |
Yes | |
Files - Source / External File | Index paths and contents |
check whether fts works
docker exec -it -u www-data nextcloud_main /bin/bash
# whole test and check connection
php ./occ fulltextsearch:test
# generate index
php ./occ fulltextsearch:index
docker run --rm --name nextcloud_fts --network nextcloud -v ./nextcloud:/var/www/html -u www-data -d nextcloud /var/www/html/occ fulltextsearch:live
to stop daemon
docker exec -it -u www-data nextcloud_fts /var/www/html/occ fulltextsearch:stop
To install additional fonts (for example Japanese fonts), we have to prepare out own collabora server. (And Japanese fonts are installed by default?)
note: With own collabora server, iOS app's viewer does not work. (but, with the embeded one, it works...) So I disabled collabora.
docker run --rm -d --network nextcloud -e "extra_params=--o:ssl.enable=false" --name nextcloud_collabora -p 9980:9980 collabora/code
Office - Administration settings - Nextcloud
Item | Value |
---|---|
Nextcloud Office / User your own server | Yes |
URL (and Port) of Collabora Online-server | http://hoge:9980 |
note: The URL should be accessible from user's browser. The host machine's address would be good. Collabora container's address would not be accessible.