diff --git a/Dockerfile b/Dockerfile index 963aedbd0..2be2f7d2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -96,6 +96,7 @@ ARG RUNTIME_PACKAGES="\ tesseract-ocr-spa \ unpaper \ pngquant \ + redis \ jbig2dec \ # lxml libxml2 \ diff --git a/docker/docker-prepare.sh b/docker/docker-prepare.sh index adf2be839..a90166679 100755 --- a/docker/docker-prepare.sh +++ b/docker/docker-prepare.sh @@ -53,6 +53,11 @@ wait_for_mariadb() { done } +start_redis() { + echo "Starting Redis Server" + redis-server & +} + wait_for_redis() { # We use a Python script to send the Redis ping # instead of installing redis-tools just for 1 thing @@ -103,6 +108,11 @@ do_work() { wait_for_postgres fi + if [[ -n "${PAPERLESS_START_REDIS}" ]]; then + export PAPERLESS_REDIS="redis://localhost:6379" + start_redis + fi + wait_for_redis migrations diff --git a/docs/configuration.md b/docs/configuration.md index 85bf940bc..958dc4a89 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1405,6 +1405,17 @@ one pod). Defaults to 8000. + +#### [`PAPERLESS_START_REDIS`](#PAPERLESS_START_REDIS) {#PAPERLESS_START_REDIS} + +: Set to non-empty to start a built-in redis server inside the container. +This option will override the `PAPERLESS_REDIS` option. + + This option has no effect when not using Docker. + + Defaults to '' (do not run built-in redis). + + #### [`USERMAP_UID=`](#USERMAP_UID) {#USERMAP_UID} : The ID of the paperless user in the container. Set this to your