15 lines
304 B
Bash
Executable File
15 lines
304 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# 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
|
|
|
|
# Upgrade DB schema to version used by application. This also initializes table, if they aren't already created.
|
|
flask db upgrade
|
|
|
|
|
|
exec "$@"
|