Proper docker files (build from code) - 2.1 (#311)

* new file: base.dockerfile
base docker file for compiling sources

deleted: build-images.sh
replaced by dev-build-images.sh

deleted: build-joex-base.sh
replaced by base / joex dockerfile

changed: consumedir.dockerfile
based on compiled tool-binaries from base image
added health check (basic, check for REST server connection)

new file: dev-build-images.sh
added one build script for all purposes
derives tag from version-file (all snapshot become latest)

new file: dev-push-images.sh
added one push script for all purposes (similar to build)

changed: docker-compose.yml
	* changed regarding entrypoints and commands now being in the images
	* added health checks for 3rd party images (postgres and solr)
	* some minor renaming of the areas

renamed: entrypoint-joex.sh -> joex-entrypoint.sh
	* for better order

renamed: joex-base.dockerfile -> joex.dockerfile
	* also reworked to base on main base image
	* plus renamed for better order

deleted: push-images.sh
	* replaced by dev-push-images.sh

deleted: push-joex-base.sh
	* not necessary anymore

changed: restserver.dockerfile
	* reworked to be base on main base image
	* smaller
	* added health check

* updated docker-compose to new images

* update docker-compose.yml

remove unnecessary network entries

* update docker-compose.yml

added missing volume for postgres

* reverted image naming scheme and added log to docker build

1. go back to local code instead of cloning git
2. added build log to docker image build script, incl. log build times.
Logs can be found in `docker/dev-log` folder
3. added docker docs and new docker build logs folder to .gitignore
4. added

* build docker images from local files instead of cloned remote repo, plus time recording of builds
 - switched way docker images are built from remote git repo to local files (which should be the git repo, but may have local changes)
 - the docker build logs will show the time needed for the single image builds

* reverted deletion of joex base dockerfile

* joex base dockerfile plus smaller improvements
  - separate joex base file
  - added docker hook to improve Docker Hub experience

* updated docker hub build hook

corrected wrong path (base is build context)

* Fix of docker hub build hook again

base path seems to be the dockerfile's folder

* fixed typo in .dockerignore

* added ability to spool log to console instead of file, especially for automated docker builds

* improved logging of build script

* minor tweaks from review (.dockerignore, docker hub hook and an error when using other repos)

* added push of non-base images to automated docker hook

* fixes for docker hub build hook

* fixed/improved docker build hook

* replaced tag-version of untagged versions with SNAPSHOT (was LATEST, which should be used or stable tags only)
plus, made the version tag mandatory for the dockerfiles

* adapted docker build and push scripts for tagged images (using docker automated builds)

* fixed docker build hook
stupid copy & paste mistake...

* minor mistake in build hook

* added validation of matching version numbers for docker automated builds (for non-snapshot builds)

* fixed missing fi in new validity check

* fixed docker build hook validity check

* mixed up version comparison fixed

* relative path error in hook validation

* mixed up version comparison fixed

* test

* fixed error in version matching for docker hook

* test

* improved versioning, so that docker images are v0.00.00

* revert version.sbt

got overwritten by accidence

* reverted version.sbt

* improved environment parameters, especially enabled setting DB params by them

	- additionally added .env file to have the same env variables for all containers

* cleaned up docker-compose.yml to fit public origin repo again

* optimized way db params are set

figured out, we do not need the DB-String to be built at startup, docspell.conf reads also multiple variables.
I still kept the restserver entrypoint, although we do not need it now - it might be helpful in the future or for debugging pruposes

* added restart option  to restart docspell, e.g. after a system reboot - but only if it was running before
This commit is contained in:
totti4ever 2020-10-19 13:56:44 +02:00 committed by GitHub
parent b323edc1f7
commit bcb42920e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 358 additions and 119 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
docker/
!docker/joex-entrypoint.sh
!docker/restserver-entrypoint.sh
!docker/docspell.conf

2
.gitignore vendored
View File

@ -14,3 +14,5 @@ _site/
/website/site/templates/shortcodes/server.conf
/website/site/templates/shortcodes/sample-exim.conf
/website/site/templates/shortcodes/joex.conf
/docker/docs
/docker/dev-log

8
docker/.env Normal file
View File

@ -0,0 +1,8 @@
TZ=Europe/Berlin
DOCSPELL_HEADER_VALUE=none
DB_TYPE=postgresql
DB_HOST=db
DB_PORT=5432
DB_NAME=dbname
DB_USER=dbuser
DB_PASS=dbpass

View File

@ -0,0 +1,51 @@
FROM alpine:latest
LABEL maintainer="eikek0 <eike@docspell.org>"
ARG ELM_VERSION=0.19.1
ARG SBT_VERSION=
RUN apk add --virtual .build-dependencies --no-cache git curl bash openjdk8
# ELM
RUN curl -L -o elm.gz https://github.com/elm/compiler/releases/download/${ELM_VERSION}/binary-for-linux-64-bit.gz
RUN gunzip elm.gz
RUN chmod +x elm
RUN mv elm /usr/local/bin/
# SBT (Scala)
ENV PATH /sbt/bin:$PATH
RUN wget https://github.com/sbt/sbt/releases/download/v${SBT_VERSION}/sbt-${SBT_VERSION}.tgz
RUN tar -xzvf sbt-$SBT_VERSION.tgz
RUN rm sbt-$SBT_VERSION.tgz
# DOCSPELL
RUN mkdir -p /src/docspell
COPY . /src/docspell/
# for a build without cloned project the following line would replace the one above
# RUN git -C /src clone https://github.com/eikek/docspell
#RUN SBT_OPTS="-Xms1024M -Xmx8G -Xss2M -XX:MaxMetaspaceSize=8G" && \
WORKDIR /src/docspell
RUN sbt -mem 4096 make
RUN sbt -mem 4096 make-zip
RUN sbt -mem 4096 make-tools
#RUN SBT_OPTS= && \
RUN mkdir -p /opt
RUN find "/src/docspell/modules/joex/target/universal/" -name "docspell-joex*.zip" -exec unzip {} -d "/opt/" \;
RUN mv /opt/docspell-joex-* /opt/docspell-joex
RUN find "/src/docspell/modules/restserver/target/universal/" -name "docspell-restserver*.zip" -exec unzip {} -d "/opt/" \;
RUN mv /opt/docspell-restserver-* /opt/docspell-restserver
RUN find "/src/docspell/tools/target/" -name "docspell-tools-*.zip" -exec unzip {} -d "/opt/" \;
RUN mv /opt/docspell-tools-* /opt/docspell-tools
RUN chmod 755 /opt/docspell-tools/*.sh
COPY ./docker/docspell.conf /opt/docspell.conf
# CLEANUP
WORKDIR /
RUN rm -r /src
RUN apk del .build-dependencies
RUN rm -r /root/.cache

9
docker/base.dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM alpine:latest
LABEL maintainer="eikek0 <eike@docspell.org>"
ENV DB_TYPE=postgresql \
DB_HOST=db \
DB_PORT=5432 \
DB_NAME=dbname \
DB_USER=dbuser \
DB_PASS=dbpass

View File

@ -1,18 +0,0 @@
#!/usr/bin/env bash
set -e
# Update the versions in joex.dockerfile and restserver.dockerfile,
# docker-compose.yml and joex/entrypoint.sh; update versions here
docker build -t eikek0/docspell:joex-0.12.0 -f joex.dockerfile .
docker build -t eikek0/docspell:restserver-0.12.0 -f restserver.dockerfile .
docker build -t eikek0/docspell:consumedir-0.12.0 -f consumedir.dockerfile .
docker tag eikek0/docspell:restserver-0.12.0 eikek0/docspell:restserver-latest
docker tag eikek0/docspell:joex-0.12.0 eikek0/docspell:joex-latest
docker tag eikek0/docspell:consumedir-0.12.0 eikek0/docspell:consumedir-latest
# test with docker-compose up

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
set -e
docker build -t eikek0/docspell:joex-base-1 -f joex-base.dockerfile .
docker tag eikek0/docspell:joex-base-1 eikek0/docspell:joex-base-latest

View File

@ -1,15 +1,19 @@
FROM alpine:latest
## CONSUMEDIR
LABEL maintainer="eikek0 <eike@docspell.org>"
ARG VERSION=
ARG REPO=
RUN apk add --no-cache unzip curl bash inotify-tools
# hack to use args in from
FROM ${REPO}:base-binaries-${VERSION} as docspell-base-binaries
RUN mkdir -p /opt \
&& cd /opt \
&& curl -L -o docspell.zip https://github.com/eikek/docspell/releases/download/v0.12.0/docspell-tools-0.12.0.zip \
&& unzip docspell.zip \
&& rm docspell.zip \
&& apk del unzip \
&& chmod 755 /opt/docspell-tools-0.12.0/*.sh
ENTRYPOINT ["/opt/docspell-tools-0.12.0/consumedir.sh"]
FROM ${REPO}:base-${VERSION}
RUN apk add --no-cache curl bash inotify-tools
COPY --from=docspell-base-binaries /opt/docspell-tools /opt/docspell-tools
ENTRYPOINT /opt/docspell-tools/consumedir.sh --path /opt/docs -i --iheader Docspell-Integration:$DOCSPELL_HEADER_VALUE -m http://docspell-restserver:7880/api/v1/open/integration/item -v
HEALTHCHECK --interval=1m --timeout=10s --retries=2 --start-period=10s \
CMD pgrep inotifywait

90
docker/dev-build-images.sh Executable file
View File

@ -0,0 +1,90 @@
#!/usr/bin/env bash
REPO="eikek0/docspell"
if [ $# -eq 1 ]; then
REPO=$1
fi
SBT_VERSION=$(grep sbt.version ../project/build.properties)
SBT_VERSION=${SBT_VERSION:12:99}
TMP_VERSION=$(cat ../version.sbt)
TMP_VERSION=${TMP_VERSION:25:99}
VERSION=${TMP_VERSION%\"}
if [[ $VERSION == *"SNAPSHOT" ]]; then
VERSION=SNAPSHOT
else
VERSION=v$VERSION
fi
# if automated build by docker, don't spool log to file
if [[ $LOG_TO_FILE -eq 1 ]]; then
logfile=./dev-log/build_$(date +%Y%m%d_%H%M).log
echo logging to logfile: $logfile
echo In order to log to console set 'LOG_TO_CONSOLE' to 1
mkdir -p ./dev-log
exec 1>>"$logfile" 2>&1
else
echo "logging to console..." && echo
fi
echo "########################################################"
date
echo && echo building docker images for version: $VERSION && echo
echo "(Repo: $REPO, SBT-Version: $SBT_VERSION)"
echo "########################################################" && echo && echo && echo
echo building base-binaries
time docker build -f ./base-binaries.dockerfile --build-arg SBT_VERSION=${SBT_VERSION} --tag ${REPO}:base-binaries-$VERSION ..
status=$?
if [[ $status -eq 0 ]]; then
echo && echo && echo && echo && echo "########################################################"
echo building base
time docker build -f ./base.dockerfile --tag ${REPO}:base-$VERSION .
status=$?
fi
if [[ $status -eq 0 ]]; then
echo && echo && echo && echo && echo "########################################################"
echo building restserver
time docker build -f ./restserver.dockerfile --tag ${REPO}:restserver-$VERSION --build-arg REPO=$REPO --build-arg VERSION=$VERSION .
status=$?
if [[ $status -eq 0 ]] && [[ "$VERSION" != "SNAPSHOT" ]]; then
docker tag ${REPO}:restserver-$VERSION ${REPO}:restserver-LATEST
fi
fi
if [[ $status -eq 0 ]]; then
echo && echo && echo && echo && echo "########################################################"
echo building joex base
time docker build -f ./joex-base.dockerfile --tag ${REPO}:joex-base-$VERSION --build-arg REPO=$REPO --build-arg VERSION=$VERSION .
status=$?
fi
if [[ $status -eq 0 ]]; then
echo && echo && echo && echo && echo "########################################################"
echo building joex
time docker build -f ./joex.dockerfile --tag ${REPO}:joex-$VERSION --build-arg REPO=$REPO --build-arg VERSION=$VERSION .
status=$?
if [[ $status -eq 0 ]] && [[ "$VERSION" != "SNAPSHOT" ]]; then
docker tag ${REPO}:joex-$VERSION ${REPO}:joex-LATEST
fi
fi
if [[ $status -eq 0 ]]; then
echo && echo && echo && echo && echo "########################################################"
echo building consumedir
time docker build -f ./consumedir.dockerfile --tag ${REPO}:consumedir-$VERSION --build-arg REPO=$REPO --build-arg VERSION=$VERSION .
status=$?
if [[ $status -eq 0 ]] && [[ "$VERSION" != "SNAPSHOT" ]]; then
docker tag ${REPO}:consumedir-$VERSION ${REPO}:consumedir-LATEST
fi
fi
echo && echo && echo
echo "######################## done ########################"
date

48
docker/dev-push-images.sh Executable file
View File

@ -0,0 +1,48 @@
#!/usr/bin/env bash
REPO="eikek0/docspell"
if [ $# -eq 1 ]; then
REPO=$1
fi
TMP_VERSION=$(cat ../version.sbt)
TMP_VERSION=${TMP_VERSION:25:99}
VERSION=${TMP_VERSION%\"}
if [[ $VERSION == *"SNAPSHOT" ]]; then
VERSION=SNAPSHOT
else
VERSION=v$VERSION
fi
echo && echo pushing docker images for version: $VERSION && echo && echo
# disabled as this doesn't to be on Docker Hub
# echo pushing base
# docker ${REPO}-base:$VERSION .
echo pushing restserver
docker push ${REPO}
exit 0
## still needs to be tested for a tagged version - that's why old version below is kept!
if [[ $? -eq 0 ]]; then
echo pushing restserver
docker push ${REPO}:restserver-$VERSION
fi
if [[ $? -eq 0 ]]; then
echo pushing joex base
docker push ${REPO}:joex-base-$VERSION
fi
if [[ $? -eq 0 ]]; then
echo pushing joex
docker push ${REPO}:joex-$VERSION
fi
if [[ $? -eq 0 ]]; then
echo pushing consumedir
docker push ${REPO}:consumedir-$VERSION
fi

View File

@ -1,59 +1,69 @@
version: '3.7'
services:
restserver:
image: eikek0/docspell:restserver-latest
image: eikek0/docspell:restserver-LATEST
container_name: docspell-restserver
command: ${DOCSPELL_RESTSERVER_JVM_ARGS} -- /opt/docspell.conf
restart: unless-stopped
ports:
- "7880:7880"
volumes:
- ${PWD}/docspell.conf:/opt/docspell.conf
environment:
- DOCSPELL_HEADER_VALUE=${DOCSPELL_HEADER_VALUE:-none}
- ./docspell.conf:/opt/docspell.conf
env_file: ./.env
depends_on:
- db
- solr
joex:
image: eikek0/docspell:joex-latest
image: eikek0/docspell:joex-LATEST
container_name: docspell-joex
command: ${DOCSPELL_JOEX_JVM_ARGS:--J-Xmx1536M} -- /opt/docspell.conf
restart: unless-stopped
env_file: ./.env
ports:
- "7878:7878"
volumes:
- ${PWD}/docspell.conf:/opt/docspell.conf
- ./docspell.conf:/opt/docspell.conf
depends_on:
- db
- solr
consumedir:
image: eikek0/docspell:consumedir-latest
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}
restart: unless-stopped
env_file: ./.env
volumes:
- ${PWD}/docs:/opt/docs
- ./docs:/opt/docs
depends_on:
- restserver
db:
image: postgres:11.7
container_name: postgres_db
restart: unless-stopped
volumes:
- postgres_data:/var/lib/postgresql/data/
- docspell-postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=dbpass
- POSTGRES_DB=dbname
- POSTGRES_USER=$DB_USER
- POSTGRES_PASSWORD=$DB_PASS
- POSTGRES_DB=$DB_NAME
solr:
image: solr:8
container_name: docspell-solr
ports:
- "8983:8983"
restart: unless-stopped
volumes:
- solr_data:/var/solr
- 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:
postgres_data:
solr_data:
docspell-postgres_data:
docspell-solr_data:

View File

@ -20,9 +20,9 @@ docspell.server {
}
backend {
jdbc {
url = "jdbc:postgresql://db:5432/dbname"
user = "dbuser"
password = "dbpass"
url = "jdbc:"${DB_TYPE}"://"${DB_HOST}":"${DB_PORT}"/"${DB_NAME}
user = ${DB_USER}
password = ${DB_PASS}
}
}
}
@ -33,9 +33,9 @@ docspell.joex {
address = "0.0.0.0"
}
jdbc {
url = "jdbc:postgresql://db:5432/dbname"
user = "dbuser"
password = "dbpass"
url = "jdbc:"${DB_TYPE}"://"${DB_HOST}":"${DB_PORT}"/"${DB_NAME}
user = ${DB_USER}
password = ${DB_PASS}
}
full-text-search {
enabled = true

50
docker/hooks/build Normal file
View File

@ -0,0 +1,50 @@
#!/bin/bash
# remove trailing slash if exists
DOCKER_REPO=${DOCKER_REPO%/}
echo "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
date
echo building image \"$IMAGE_NAME\" in repository \"$DOCKER_REPO\" using dockerfile \"$DOCKERFILE_PATH\"
echo image was triggered by automated build for tag \"$DOCKER_TAG\"
echo " based on branch \"$SOURCE_BRANCH\" and commit \"$SOURCE_COMMIT\""
echo " commit message was \"$COMMIT_MSG\""
echo && echo && echo
echo "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
# verify that version.sbt and tag match for non-snapshot (ENV variable DOCKER_VERIFY_TAG must be set to 1)
if [ $DOCKER_VERIFY_TAG -eq 1 ] && [[ "$DOCKER_TAG" != *"-SNAPSHOT" ]]; then
echo validating version number...
TMP_VERSION=$(cat ../version.sbt)
TMP_VERSION=${TMP_VERSION:25:99}
VERSION=${TMP_VERSION%\"}
if [ "$DOCKER_TAG" != "base-v$VERSION" ]; then
echo "version number mismatch (Docker/Tag: $DOCKER_TAG, Project: $VERSION), aborting!"
exit 1
fi
fi
./dev-build-images.sh "$DOCKER_REPO"
status=$?
if [[ $status -eq 0 ]]; then
echo "#### pushing images ####"
./dev-push-images.sh "$DOCKER_REPO"
fi
echo && echo && date
echo "||||||||||||||||||||||||||||||||||||||||||||| done |||||||||||||||||||||||||||||||||||||||||||||"
###################################
# available variables
## SOURCE_BRANCH: the name of the branch or the tag that is currently being tested.
## SOURCE_COMMIT: the SHA1 hash of the commit being tested.
## COMMIT_MSG: the message from the commit being tested and built.
## DOCKER_REPO: the name of the Docker repository being built.
## DOCKERFILE_PATH: the dockerfile currently being built.
## DOCKER_TAG: the Docker repository tag being built.
## IMAGE_NAME: the name and tag of the Docker repository being built. (This variable is a combination of DOCKER_REPO:DOCKER_TAG.)
###################################

View File

@ -1,11 +1,14 @@
FROM alpine:latest
## JOEX-BASE
ARG VERSION=
ARG REPO=
ENV UNO_URL https://raw.githubusercontent.com/unoconv/unoconv/0.9.0/unoconv
LABEL maintainer="eikek0 <eike@docspell.org>"
FROM ${REPO}:base-${VERSION}
ARG UNO_URL=https://raw.githubusercontent.com/unoconv/unoconv/0.9.0/unoconv
ENV JAVA_OPTS="-Xmx1536M"
RUN apk add --no-cache openjdk11-jre \
unzip \
bash \
curl \
ghostscript \
@ -35,7 +38,5 @@ RUN apk add --no-cache openjdk11-jre \
&& pip3 install ocrmypdf \
&& curl -Ls $UNO_URL -o /usr/local/bin/unoconv \
&& chmod +x /usr/local/bin/unoconv \
&& apk del curl unzip libxml2-dev libxslt-dev zlib-dev g++ python3-dev py3-pip libffi-dev qpdf-dev openssl-dev
# Required for unoconv
RUN ln -s /usr/bin/python3 /usr/bin/python
&& apk del curl libxml2-dev libxslt-dev zlib-dev g++ python3-dev py3-pip libffi-dev qpdf-dev openssl-dev \
&& ln -s /usr/bin/python3 /usr/bin/python

View File

@ -3,4 +3,4 @@
echo "Starting unoconv listener"
unoconv -l &
/opt/docspell-joex-0.12.0/bin/docspell-joex "$@"
/opt/docspell-joex/bin/docspell-joex "$@"

View File

@ -1,21 +1,20 @@
FROM eikek0/docspell:joex-base-latest
## JOEX
LABEL maintainer="eikek0 <eike@docspell.org>"
ARG VERSION=
ARG REPO=
RUN apk add --no-cache openjdk11-jre \
unzip \
bash \
curl \
&& mkdir -p /opt \
&& cd /opt \
&& curl -L -o docspell.zip https://github.com/eikek/docspell/releases/download/v0.12.0/docspell-joex-0.12.0.zip \
&& unzip docspell.zip \
&& rm docspell.zip \
&& apk del curl unzip
# hack to use args in from
FROM ${REPO}:base-binaries-${VERSION} as docspell-base-binaries
COPY entrypoint-joex.sh /opt/entrypoint.sh
FROM ${REPO}:joex-base-${VERSION}
COPY --from=docspell-base-binaries /opt/docspell-joex /opt/docspell-joex
COPY joex-entrypoint.sh /opt/joex-entrypoint.sh
ENTRYPOINT ["/opt/joex-entrypoint.sh"]
CMD ["/opt/docspell.conf"]
EXPOSE 7878
ENTRYPOINT ["/opt/entrypoint.sh"]
HEALTHCHECK --interval=1m --timeout=10s --retries=2 --start-period=10s \
CMD pgrep -f joex/lib

View File

@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -e
# Update the versions in joex.dockerfile and restserver.dockerfile,
# docker-compose.yml and joex/entrypoint.sh; update versions here
docker push eikek0/docspell:joex-0.12.0
docker push eikek0/docspell:restserver-0.12.0
docker push eikek0/docspell:consumedir-0.12.0
docker push eikek0/docspell:restserver-latest
docker push eikek0/docspell:joex-latest
docker push eikek0/docspell:consumedir-latest
# test with docker-compose up

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
set -e
docker push eikek0/docspell:joex-base-1
docker push eikek0/docspell:joex-base-latest

View File

@ -0,0 +1,3 @@
#!/bin/sh
/opt/docspell-restserver/bin/docspell-restserver $@

View File

@ -1,16 +1,21 @@
FROM alpine:latest
## RESTSERVER
LABEL maintainer="eikek0 <eike@docspell.org>"
ARG VERSION=
ARG REPO=
RUN apk add --no-cache openjdk11-jre unzip curl bash
# hack to use args in from
FROM ${REPO}:base-binaries-${VERSION} as docspell-base-binaries
RUN mkdir -p /opt \
&& cd /opt \
&& curl -L -o docspell.zip https://github.com/eikek/docspell/releases/download/v0.12.0/docspell-restserver-0.12.0.zip \
&& unzip docspell.zip \
&& rm docspell.zip \
&& apk del unzip curl
FROM ${REPO}:base-${VERSION}
RUN apk add --no-cache --virtual .restserver-dependencies openjdk11-jre bash
COPY --from=docspell-base-binaries /opt/docspell-restserver /opt/docspell-restserver
COPY restserver-entrypoint.sh /opt/restserver-entrypoint.sh
ENTRYPOINT ["/opt/restserver-entrypoint.sh"]
CMD ["/opt/docspell.conf"]
EXPOSE 7880
ENTRYPOINT ["/opt/docspell-restserver-0.12.0/bin/docspell-restserver"]
HEALTHCHECK --interval=1m --timeout=10s --retries=2 --start-period=30s \
CMD wget --spider http://localhost:7880