rm db test

This commit is contained in:
Sam
2017-02-16 19:15:51 +01:00
parent 540d3180f1
commit c27b04b63a

View File

@@ -23,26 +23,6 @@ else
done
fi
# widely inspired from https://github.com/docker-library/wordpress/blob/c674e9ceedf582705e0ad8487c16b42b37a5e9da/fpm/docker-entrypoint.sh#L128
TERM=dumb php -- "$DB_HOST" "$DB_USERNAME" "$DB_PASSWORD" "$DB_DATABASE" <<'EOPHP'
<?php
$stderr = fopen('php://stderr', 'w');
list($host, $port) = explode(':', $argv[1], 2);
$maxTries = 20;
do {
try {
$connection = new Pdo("mysql:dbname={$argv[4]};host={$host};port={$port}", $argv[2], $argv[3]);
fwrite($stderr, 'MySQL ready'. "\n");
exit(0);
} catch (PDOException $e) {
fwrite($stderr, 'MySQL Connection Error: ' . $e->getMessage(). "\n");
if (--$maxTries <= 0) {
exit(1);
}
sleep(3);
}
} while (true);
EOPHP
#php artisan optimize --force
#php artisan migrate --force