]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
When starting with an external DB, start it for a bit first to allow its setup to...
authorTrenton H <797416+stumpylog@users.noreply.github.com>
Tue, 20 Jun 2023 15:05:03 +0000 (08:05 -0700)
committerTrenton H <797416+stumpylog@users.noreply.github.com>
Tue, 20 Jun 2023 15:20:44 +0000 (08:20 -0700)
install-paperless-ngx.sh

index 469f96005f3afce036c01090c71dc4dc45418cc0..512ed9ab55cd061834d1a28311cab800a0e8551e 100755 (executable)
@@ -384,6 +384,14 @@ fi
 
 ${DOCKER_COMPOSE_CMD} pull
 
+if [ "$DATABASE_BACKEND" == "postgres" ] || [ "$DATABASE_BACKEND" == "mariadb" ] ; then
+       echo "Starting DB first for initilzation"
+       ${DOCKER_COMPOSE_CMD} up --detach db
+       # hopefully enough time for even the slower systems
+       sleep 15
+       ${DOCKER_COMPOSE_CMD} stop
+fi
+
 ${DOCKER_COMPOSE_CMD} run --rm -e DJANGO_SUPERUSER_PASSWORD="$PASSWORD" webserver createsuperuser --noinput --username "$USERNAME" --email "$EMAIL"
 
 ${DOCKER_COMPOSE_CMD} up --detach