Enhancement: add a built-in redis to docker image
This commit is contained in:
parent
700af8caa2
commit
9d0ed31545
@ -96,6 +96,7 @@ ARG RUNTIME_PACKAGES="\
|
||||
tesseract-ocr-spa \
|
||||
unpaper \
|
||||
pngquant \
|
||||
redis \
|
||||
jbig2dec \
|
||||
# lxml
|
||||
libxml2 \
|
||||
|
@ -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
|
||||
|
@ -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=<uid>`](#USERMAP_UID) {#USERMAP_UID}
|
||||
|
||||
: The ID of the paperless user in the container. Set this to your
|
||||
|
Loading…
x
Reference in New Issue
Block a user