added some messages to the docker startup script

This commit is contained in:
jonaswinkler 2021-01-13 19:58:09 +01:00
parent 654c7fd2ac
commit deb9698ff6

View File

@ -62,6 +62,7 @@ migrations() {
# simultaneously. This also ensures that the db is ready when the command # simultaneously. This also ensures that the db is ready when the command
# of the current container starts. # of the current container starts.
flock 200 flock 200
echo "Apply database migrations..."
sudo -HEu paperless python3 manage.py migrate sudo -HEu paperless python3 manage.py migrate
) 200>/usr/src/paperless/data/migration_lock ) 200>/usr/src/paperless/data/migration_lock
@ -85,6 +86,8 @@ initialize() {
} }
install_languages() { install_languages() {
echo "Installing languages..."
local langs="$1" local langs="$1"
read -ra langs <<<"$langs" read -ra langs <<<"$langs"
@ -119,6 +122,8 @@ install_languages() {
done done
} }
echo "Paperless-ng docker container starting..."
# Install additional languages if specified # Install additional languages if specified
if [[ ! -z "$PAPERLESS_OCR_LANGUAGES" ]]; then if [[ ! -z "$PAPERLESS_OCR_LANGUAGES" ]]; then
install_languages "$PAPERLESS_OCR_LANGUAGES" install_languages "$PAPERLESS_OCR_LANGUAGES"
@ -127,8 +132,10 @@ fi
initialize initialize
if [[ "$1" != "/"* ]]; then if [[ "$1" != "/"* ]]; then
echo Executing management command "$@"
exec sudo -HEu paperless python3 manage.py "$@" exec sudo -HEu paperless python3 manage.py "$@"
else else
echo Executing "$@"
exec "$@" exec "$@"
fi fi