Prepare docker setup for fulltext search

This commit is contained in:
Eike Kettner 2020-06-28 02:12:57 +02:00
parent df73bc6285
commit d3b3c6289b
5 changed files with 58 additions and 28 deletions

View File

@ -1,15 +1,39 @@
version: '3.7'
services:
restserver:
image: eikek0/docspell:restserver-0.7.0
image: eikek0/docspell:restserver-latest
container_name: docspell-restserver
command: /opt/docspell.conf
ports:
- "7880:7880"
volumes:
- ${PWD}/docspell.conf:/opt/docspell.conf
environment:
- DOCSPELL_HEADER_VALUE=${DOCSPELL_HEADER_VALUE:-none}
depends_on:
- db
- solr
joex:
image: eikek0/docspell:joex-latest
container_name: docspell-joex
command: /opt/docspell.conf
ports:
- "7878:7878"
volumes:
- ${PWD}/docspell.conf:/opt/docspell.conf
depends_on:
- db
- solr
consumedir:
image: eikek0/docspell:consumedir-latest
container_name: docspell-consumedir
command: --path /opt/docs -i --iheader "Docspell-Integration:${DOCSPELL_HEADER_VALUE}" -m http://restserver:7880/api/v1/open/integration/item
environment:
- DOCSPELL_HEADER_VALUE=${DOCSPELL_HEADER_VALUE:-none}
volumes:
- ${PWD}/docs:/opt/docs
depends_on:
- restserver
db:
image: postgres:11.7
container_name: postgres_db
@ -19,26 +43,17 @@ services:
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=dbpass
- POSTGRES_DB=dbname
joex:
image: eikek0/docspell:joex-0.7.0
container_name: docspell-joex
command: /opt/docspell.conf
solr:
image: solr:8
container_name: docspell-solr
ports:
- "7878:7878"
- "8983:8983"
volumes:
- ${PWD}/docspell.conf:/opt/docspell.conf
depends_on:
- db
consumedir:
image: eikek0/docspell:consumedir-0.7.0
container_name: docspell-consumedir
command: --path /opt/docs -m http://restserver:7880/api/v1/open/upload/item/$SOURCE_ID
environment:
- SOURCE_ID=${SOURCE_ID:-none}
volumes:
- ${PWD}/docs:/opt/docs
depends_on:
- restserver
- solr_data:/var/solr
command:
- solr-precreate
- docspell
volumes:
postgres_data:
solr_data:

View File

@ -3,6 +3,21 @@ docspell.server {
bind {
address = "0.0.0.0"
}
integration-endpoint {
enabled = true
http-header {
enabled = true
header-value = ${?DOCSPELL_HEADER_VALUE}
}
}
# Configuration of the full-text search engine.
full-text-search {
enabled = true
recreate-key = ""
solr = {
url = "http://solr:8983/solr/docspell"
}
}
backend {
jdbc {
url = "jdbc:postgresql://db:5432/dbname"
@ -22,6 +37,12 @@ docspell.joex {
user = "dbuser"
password = "dbpass"
}
full-text-search {
enabled = true
solr = {
url = "http://solr:8983/solr/docspell"
}
}
scheduler {
pool-size = 1
}

View File

@ -29,7 +29,7 @@ RUN apk add --no-cache openjdk11-jre \
&& rm docspell.zip \
&& apk del curl unzip
COPY joex/entrypoint.sh /opt/entrypoint.sh
COPY entrypoint-joex.sh /opt/entrypoint.sh
EXPOSE 7878

View File

@ -1,6 +0,0 @@
#!/bin/sh
echo "Starting unoconv listener"
unoconv -l &
/opt/docspell-joex-0.7.0/bin/docspell-joex "$@"

View File

@ -106,8 +106,8 @@ be useful to connect other trusted applications to docspell (that run
on the same host or network).
The endpoint is disabled by default, an admin must change the
`docspell.restserver.integration-endpoint.enabled` flag to `true` in
the [configuration file](configure#rest-server).
`docspell.server.integration-endpoint.enabled` flag to `true` in the
[configuration file](configure#rest-server).
If queried by a `GET` request, it returns whether it is enabled and
the collective exists.