adrema/.docker/horizon-entrypoint

14 lines
366 B
Plaintext
Raw Normal View History

2023-07-20 22:58:51 +02:00
#!/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
}
2023-07-21 11:28:45 +02:00
su www-data -c 'php artisan horizon'