adrema/.docker/horizon-entrypoint

14 lines
366 B
Bash
Executable File

#!/bin/bash
set -e
# ------------------------- check for database access -------------------------
function wait_for_db {
while true; do
echo "waiting for Database init"
php -r 'new PDO("mysql:host='$DB_HOST';dbname='$DB_DATABASE'", "'$DB_USERNAME'", "'$DB_PASSWORD'");' > /dev/null && return 0
done
}
su www-data -c 'php artisan horizon'