Skip to content
Snippets Groups Projects
Commit 3b8e340f authored by Théo - Le Filament's avatar Théo - Le Filament
Browse files

feat(entrypoint): wait database before start Odoo

parent 79f6f17a
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,13 @@ export PGUSER=$value
check_config "db_password" "$PASSWORD"
export PGPASSWORD=$value
if ! psql -l | grep $PGDATABASE; then
echo "waiting until postgres is listening at ${PGHOST}..."
while true; do
psql --list > /dev/null 2>&1 && break
sleep 1
done
if ! psql --list 2> /dev/null | grep $PGDATABASE > /dev/null 2>&1; then
echo "Database $PGDATABASE does not exist"
DB_ARGS+=("--load-language")
DB_ARGS+=("fr_FR")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment