set -e if [ "$(id -u)" = "0" ]; then exit 1 fi if [ ! -z "$DB_HOST" ] && [ ! -z "$DB_PORT" ]; then while : ; do nc -z "$DB_HOST" "$DB_PORT" && break echo waiting for db at "$DB_HOST":"$DB_PORT" sleep 5 done fi set -x # TODO run non-interactively php artisan koel:init apache2-foreground