Enhancement: add a built-in redis to docker image

This commit is contained in:
Yifan Gu
2024-03-06 21:32:11 -05:00
parent 700af8caa2
commit 9d0ed31545
3 changed files with 22 additions and 0 deletions

View File

@@ -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