Allow servers to be pre-loaded into container deployments. Fixes #3801

This commit is contained in:
Dave Page
2018-12-05 17:16:46 +00:00
parent 55402ec7d9
commit 1141930178
4 changed files with 130 additions and 2 deletions

View File

@@ -14,6 +14,11 @@ if [ ! -f /var/lib/pgadmin/pgadmin4.db ]; then
# Initialize DB before starting Gunicorn
# Importing pgadmin4 (from this script) is enough
python run_pgadmin.py
# Pre-load any required servers
if [ -f /pgadmin4/servers.json ]; then
/usr/local/bin/python /pgadmin4/setup.py --load-servers /pgadmin4/servers.json --user ${PGADMIN_DEFAULT_EMAIL}
fi
fi
# Start Postfix to handle password resets etc.