Closed alexshepherd-hydrant closed 8 years ago
I guess that there just hasn't been a need for that ... let see what travis thinks ... #11
you are right in that the only reason it's hardcoded is to fit the docker compose yml.
If not I guess it's not bad for us to provide a default AEGIR_DATABASE_SERVER as long as typical users don't have to set the environment var.
In developing something that builds upon this, I found that I could only use a DB host called "database", but it's only due to the mysql_ready method having it hardcoded, making it impossible to override.
I tried out swapping "database" for "$AEGIR_DATABASE_SERVER" on line 16 of docker-entrypoint.sh, and then overriding AEGIR_DATABASE_SERVER with a custom DB container name in my own docker-compose.yml worked as expected.
Without this change, it loops forever with "waiting for mysql ..." every 3 seconds.
Is there any deliberate reason it's hardcoded instead of using the AEGIR_DATABASE_SERVER environment variable, or is this a bug?