added db host and port for mysql to docker-compose.drupal.mariadb.yml #339
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 runmake update-settings-php
but those values had not been derived yet. This caused my settings.php file to be populated correctly, except forwhich 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.