polydigital / backdrop-civicrm-docker

0 stars 1 forks source link

Get host ip address dynamically #34

Closed tabroughton closed 5 years ago

tabroughton commented 5 years ago

As a developer/deploying containers I don't want to have to look up the host IP address for docker host and add it as an environment var manually.

In issue #15 we ensured that the docker container and host were using the same hostname to access civicrm. This was a manual entry of the host docker0 ip address Which can be accessed with $ ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+'

It would be better if this ip address was set automatically at docker run (docker-compose up).

tabroughton commented 5 years ago

this already happens here:

https://github.com/polydigital/backdrop-civicrm-docker/blob/ce952a8050f85f8f6efb6cb7d1305b1e0d05a5cf/restart-docker.sh#L10