Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added db host and port for mysql to docker-compose.drupal.mariadb.yml #339

Merged
merged 1 commit into from
May 31, 2023

Conversation

joshdentremont
Copy link
Contributor

@joshdentremont joshdentremont commented May 30, 2023

This PR adds the DRUPAL_DEFAULT_DB_HOST and DRUPAL_DEFAULT_DB_PORT environment variables to the Drupal container when using mariadb.

Previously these were populated when the container spins up, as described in the README for Drupal and the base image:
"The default value is derived from DB_DRIVER if not specified"

This caused an issue for me where running make up would wait 10 seconds then run make update-settings-php but those values had not been derived yet. This caused my settings.php file to be populated correctly, except for

$databases['default']['default']['host'] = 'mariadb';
$databases['default']['default']['port'] = '3306';

which were both blank.

If I changed the wait from 10 to 30 seconds it would work, but by specifying it in the docker-compose file it removes the risk of these being blank because they are now specified as environment variables when starting the container.

This might be hard to test, because it only happened to me on a production environment where settings.php is created when the site is spun up and is not part of the image. It should be easy to test that it doesn't hurt anything though.

@alxp alxp merged commit 5f8d3d2 into Islandora-Devops:development May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants