drupal-docker-lite
drupal-docker-lite copied to clipboard
Check that MySQL is ready before installing a profile
Sometimes the start command runs a bit to fast, and tries to install a profile before MySQL is ready (usually on brand new containers). We need a way to wait for MySQL to be ready to avoid errors like this:
Do you want to install a site profile? [y/n] y
Please enter a profile name to install.
Profile: standard
You are about to create a sites/sites.php file and CREATE the 'drupal' database. Do you want to continue? (y/n): y
Failed to create database: ERROR 2003 (HY000): Can't connect to MySQL server on 'mysql' (111) [error]
Installation failed. Please consult the log and file an issue if appropriate