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 \
|
tesseract-ocr-spa \
|
||||||
unpaper \
|
unpaper \
|
||||||
pngquant \
|
pngquant \
|
||||||
|
redis \
|
||||||
jbig2dec \
|
jbig2dec \
|
||||||
# lxml
|
# lxml
|
||||||
libxml2 \
|
libxml2 \
|
||||||
|
@ -53,6 +53,11 @@ wait_for_mariadb() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
start_redis() {
|
||||||
|
echo "Starting Redis Server"
|
||||||
|
redis-server &
|
||||||
|
}
|
||||||
|
|
||||||
wait_for_redis() {
|
wait_for_redis() {
|
||||||
# We use a Python script to send the Redis ping
|
# We use a Python script to send the Redis ping
|
||||||
# instead of installing redis-tools just for 1 thing
|
# instead of installing redis-tools just for 1 thing
|
||||||
@ -103,6 +108,11 @@ do_work() {
|
|||||||
wait_for_postgres
|
wait_for_postgres
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${PAPERLESS_START_REDIS}" ]]; then
|
||||||
|
export PAPERLESS_REDIS="redis://localhost:6379"
|
||||||
|
start_redis
|
||||||
|
fi
|
||||||
|
|
||||||
wait_for_redis
|
wait_for_redis
|
||||||
|
|
||||||
migrations
|
migrations
|
||||||
|
@ -1405,6 +1405,17 @@ one pod).
|
|||||||
|
|
||||||
Defaults to 8000.
|
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}
|
#### [`USERMAP_UID=<uid>`](#USERMAP_UID) {#USERMAP_UID}
|
||||||
|
|
||||||
: The ID of the paperless user in the container. Set this to your
|
: The ID of the paperless user in the container. Set this to your
|
||||||
|
Loading…
x
Reference in New Issue
Block a user