mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 18:08:25 +00:00
Rework docker setup
This commit is contained in:
2
docker/docker-compose/.env
Normal file
2
docker/docker-compose/.env
Normal file
@ -0,0 +1,2 @@
|
||||
TZ=Europe/Berlin
|
||||
DOCSPELL_HEADER_VALUE=none
|
80
docker/docker-compose/docker-compose.yml
Normal file
80
docker/docker-compose/docker-compose.yml
Normal file
@ -0,0 +1,80 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
|
||||
restserver:
|
||||
image: docspell/restserver:latest
|
||||
container_name: docspell-restserver
|
||||
command:
|
||||
- /opt/docspell.conf
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "7880:7880"
|
||||
volumes:
|
||||
- ./docspell.conf:/opt/docspell.conf
|
||||
env_file: ./.env
|
||||
depends_on:
|
||||
- solr
|
||||
|
||||
joex:
|
||||
image: docspell/joex:latest
|
||||
container_name: docspell-joex
|
||||
command:
|
||||
- /opt/docspell.conf
|
||||
restart: unless-stopped
|
||||
env_file: ./.env
|
||||
ports:
|
||||
- "7878:7878"
|
||||
volumes:
|
||||
- ./docspell.conf:/opt/docspell.conf
|
||||
depends_on:
|
||||
- solr
|
||||
|
||||
consumedir:
|
||||
image: docspell/tools:latest
|
||||
container_name: docspell-consumedir
|
||||
command:
|
||||
- ds-consumedir
|
||||
- "-vmdi"
|
||||
- "--path"
|
||||
- "/opt/docs"
|
||||
- "--iheader"
|
||||
- "Docspell-Integration:$DOCSPELL_HEADER_VALUE"
|
||||
- "http://docspell-restserver:7880/api/v1/open/integration/item"
|
||||
restart: unless-stopped
|
||||
env_file: ./.env
|
||||
volumes:
|
||||
- ./docs:/opt/docs
|
||||
depends_on:
|
||||
- restserver
|
||||
|
||||
db:
|
||||
image: postgres:13.3
|
||||
container_name: postgres_db
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- docspell-postgres_data:/var/lib/postgresql/data/
|
||||
environment:
|
||||
- POSTGRES_USER=dbuser
|
||||
- POSTGRES_PASSWORD=dbpass
|
||||
- POSTGRES_DB=dbname
|
||||
|
||||
solr:
|
||||
image: solr:8
|
||||
container_name: docspell-solr
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- docspell-solr_data:/var/solr
|
||||
command:
|
||||
- solr-precreate
|
||||
- docspell
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "f", "http://localhost:8983/solr/docspell/admin/ping"]
|
||||
interval: 1m
|
||||
timeout: 10s
|
||||
retries: 2
|
||||
start_period: 30s
|
||||
|
||||
|
||||
volumes:
|
||||
docspell-postgres_data:
|
||||
docspell-solr_data:
|
83
docker/docker-compose/docspell.conf
Normal file
83
docker/docker-compose/docspell.conf
Normal file
@ -0,0 +1,83 @@
|
||||
# This is the configuration file for docspell. It contains two main
|
||||
# namespaces: docspell.server and docspell.joex. Each provide the
|
||||
# config for the respective component.
|
||||
#
|
||||
# They can be moved to different files, if necessary. For this example
|
||||
# though, both components are configured in this single file.
|
||||
#
|
||||
# Below are only some settings that differ from the default. Please
|
||||
# see https://docspell.org/docs/configure/#default-config for all
|
||||
# options and their documentation. This page provides more
|
||||
# information about the important config options.
|
||||
#
|
||||
# Note: this docker-compose setup is an example to get started. It
|
||||
# sets up one rest-server, one joex, a postgres database and a solr –
|
||||
# all on the same machine.
|
||||
|
||||
# Define settings that are used in multiple places:
|
||||
db_url="jdbc:postgresql://db:5432/dbname"
|
||||
db_user="dbuser"
|
||||
db_pass="dbpass"
|
||||
solr_url="http://docspell-solr:8983/docspell"
|
||||
|
||||
|
||||
# This configures the restserver
|
||||
docspell.server {
|
||||
base-url = "http://localhost:7880"
|
||||
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
|
||||
solr = {
|
||||
url = ${solr_url}
|
||||
}
|
||||
}
|
||||
backend {
|
||||
jdbc {
|
||||
url = ${db_url}
|
||||
user = ${db_user}
|
||||
password = ${db_pass}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# This configures joex
|
||||
#
|
||||
# Note to joex: It is currently setup for one instance. Should you
|
||||
# want to scale joex instance up (maybe to help processing a batch of
|
||||
# files), there are two options:
|
||||
#
|
||||
# - look at https://github.com/eikek/docspell/pull/552 to elastically
|
||||
# start and stop joex instances via docker-compose
|
||||
# - set pool-size to some higher number; this requires to restart joex
|
||||
#
|
||||
docspell.joex {
|
||||
base-url = "http://docspell-joex:7878"
|
||||
bind {
|
||||
address = "0.0.0.0"
|
||||
}
|
||||
jdbc {
|
||||
url = ${db_url}
|
||||
user = ${db_user}
|
||||
password = ${db_pass}
|
||||
}
|
||||
full-text-search {
|
||||
enabled = true
|
||||
solr = {
|
||||
url = ${solr_url}
|
||||
}
|
||||
}
|
||||
scheduler {
|
||||
pool-size = 1
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user