Skip to content

improve connection between containers #3

@ghost

Description

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:

  • timeout of 10 seconds
  • tries 60 times (1 time each second sleep 1)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions