You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that the HOSTNAME isn't going to be correct. It's hardcoded as "mysql" but it'll be phpipam-mysql because of the way container linking works. The MYSQL_ENV_MYSQL_ROOT_PASSWORD variable also isn't right. It seems the right way to go about it is to figure out how to derive the linked container name and never hardcode it.
If you can loop through environmental attributes you could look for
(.*)_(.*)_ENV_MYSQL_ROOT_PASSWORD
and it should give you the name of both sides of your links. I imagine there is a more dockery way to do this, but I'm a newbie.. I was only able to identify that there was a problem, I couldn't come up with a good fix for it. :)
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for opening an issue (and sorry to read it almost 1 year after :/ ).
You're right, the example does not work as-is, it was written and never tested :)
I updated the example with something working this time: 3738d6a
This:
Creates an environment that looks like this:
The problem is that the HOSTNAME isn't going to be correct. It's hardcoded as "mysql" but it'll be phpipam-mysql because of the way container linking works. The MYSQL_ENV_MYSQL_ROOT_PASSWORD variable also isn't right. It seems the right way to go about it is to figure out how to derive the linked container name and never hardcode it.
If you can loop through environmental attributes you could look for
and it should give you the name of both sides of your links. I imagine there is a more dockery way to do this, but I'm a newbie.. I was only able to identify that there was a problem, I couldn't come up with a good fix for it. :)
The text was updated successfully, but these errors were encountered: