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' version: '3.7'
services: services:
restserver: restserver:
image: eikek0/docspell:restserver-0.7.0 image: eikek0/docspell:restserver-latest
container_name: docspell-restserver container_name: docspell-restserver
command: /opt/docspell.conf command: /opt/docspell.conf
ports: ports:
- "7880:7880" - "7880:7880"
volumes: volumes:
- ${PWD}/docspell.conf:/opt/docspell.conf - ${PWD}/docspell.conf:/opt/docspell.conf
environment:
- DOCSPELL_HEADER_VALUE=${DOCSPELL_HEADER_VALUE:-none}
depends_on: depends_on:
- db - 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: db:
image: postgres:11.7 image: postgres:11.7
container_name: postgres_db container_name: postgres_db
@ -19,26 +43,17 @@ services:
- POSTGRES_USER=dbuser - POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=dbpass - POSTGRES_PASSWORD=dbpass
- POSTGRES_DB=dbname - POSTGRES_DB=dbname
joex: solr:
image: eikek0/docspell:joex-0.7.0 image: solr:8
container_name: docspell-joex container_name: docspell-solr
command: /opt/docspell.conf
ports: ports:
- "7878:7878" - "8983:8983"
volumes: volumes:
- ${PWD}/docspell.conf:/opt/docspell.conf - solr_data:/var/solr
depends_on: command:
- db - solr-precreate
consumedir: - docspell
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
volumes: volumes:
postgres_data: postgres_data:
solr_data:

View File

@ -3,6 +3,21 @@ docspell.server {
bind { bind {
address = "0.0.0.0" 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 { backend {
jdbc { jdbc {
url = "jdbc:postgresql://db:5432/dbname" url = "jdbc:postgresql://db:5432/dbname"
@ -22,6 +37,12 @@ docspell.joex {
user = "dbuser" user = "dbuser"
password = "dbpass" password = "dbpass"
} }
full-text-search {
enabled = true
solr = {
url = "http://solr:8983/solr/docspell"
}
}
scheduler { scheduler {
pool-size = 1 pool-size = 1
} }

View File

@ -29,7 +29,7 @@ RUN apk add --no-cache openjdk11-jre \
&& rm docspell.zip \ && rm docspell.zip \
&& apk del curl unzip && apk del curl unzip
COPY joex/entrypoint.sh /opt/entrypoint.sh COPY entrypoint-joex.sh /opt/entrypoint.sh
EXPOSE 7878 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). on the same host or network).
The endpoint is disabled by default, an admin must change the The endpoint is disabled by default, an admin must change the
`docspell.restserver.integration-endpoint.enabled` flag to `true` in `docspell.server.integration-endpoint.enabled` flag to `true` in the
the [configuration file](configure#rest-server). [configuration file](configure#rest-server).
If queried by a `GET` request, it returns whether it is enabled and If queried by a `GET` request, it returns whether it is enabled and
the collective exists. the collective exists.