#!/bin/bash # Wait for PostgreSQL while ! pg_isready -q -h localhost -p 5432 -U postadmin do echo "$(date) - waiting for database to start" sleep 2 done # Run migrations alembic upgrade head # Start Supervisor /usr/bin/supervisord