guifi / docker-drupal-guifi

Docker images for Drupal with drupal-guifi module enabled
2 stars 4 forks source link

improve connection between containers #3

Open ghost opened 7 years ago

ghost commented 7 years ago

I'm anticipating a lot, just remembering something good I learnt.

We should avoid this kind of waiting:

sleep 15; # We should wait for mariadb container being ready

src https://github.com/guifi/docker-drupal-guifi/blob/master/drupal6/drupal-guifi/drupal-entry.pl#L18

What I suggest is replacing it for something like this:

https://github.com/Bitergia/docker/blob/master/utils/entrypoint-common.sh#L13-L60

This is like a "little framework"-function to easily manage connections to services with adjustable variables:

you see that in this repo there are lots of other facilities and useful functions. At the moment I'm not needing the others, but we will see in the future