docker-drupal icon indicating copy to clipboard operation
docker-drupal copied to clipboard

Where is located the external mysql config ?

Open victorkurauchi opened this issue 6 years ago • 1 comments

Hi Boran, i'm trying to use your docker-drupal and i would like to know how drupal finds the exeternal mysql config passed by env with docker ?

I mean, as far as i know we need to update settings.php and set the database values on the drupal project we're working on.

docker run -td -p 8004:80 --name bc -e "DRUPAL_VERSION=drupal-8" -e "DRUPAL_ADMIN_PW=foo" -e "DRUPAL_SITE_NAME=My Super site" -e "MYSQL_HOST=10.1.1.1" -e "MYSQL_DATABASE=drupal_site1" -e "MYSQL_USER=drupal_site1" -e "MYSQL_PASSWORD=pass4drupal_site1" -v /opt/foo:/var/www/html boran/drupal

How does it work with docker ? Which moment the value is set, how those variables are set on the settings.php ?

Thanks!

victorkurauchi avatar Feb 28 '18 14:02 victorkurauchi

See start.sh, specifically drush site-install

https://github.com/Boran/docker-drupal/blob/master/start.sh#L224

Boran avatar Feb 28 '18 21:02 Boran