mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 23:35:22 +01:00
Adds simple Python to wait for Redis broker to be ready (with minor Dockerfile improvements)
This commit is contained in:
parent
f9194bd28c
commit
2407798d2e
3 changed files with 54 additions and 0 deletions
|
|
@ -27,6 +27,14 @@ wait_for_postgres() {
|
|||
done
|
||||
}
|
||||
|
||||
wait_for_redis() {
|
||||
# We use a Python script to send the Redis ping
|
||||
# instead of installing redis-tools just for 1 thing
|
||||
if ! python3 /sbin/wait-for-redis.py; then
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
migrations() {
|
||||
(
|
||||
# flock is in place to prevent multiple containers from doing migrations
|
||||
|
|
@ -60,6 +68,8 @@ do_work() {
|
|||
wait_for_postgres
|
||||
fi
|
||||
|
||||
wait_for_redis
|
||||
|
||||
migrations
|
||||
|
||||
search_index
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue