2021-03-24 10:05:36 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-05-05 12:26:26 +00:00
|
|
|
# Wait for PostgreSQL container to spin up.
|
|
|
|
while ! curl http://db:5432/ 2>&1 | grep '52'
|
|
|
|
do
|
|
|
|
echo "Waiting for PostgreSQL to start."
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
2021-03-24 10:05:36 +00:00
|
|
|
# Upgrade DB schema to version used by application. This also initializes table, if they aren't already created.
|
|
|
|
flask db upgrade
|
|
|
|
|
|
|
|
|
|
|
|
exec "$@"
|