pierrecdn / phpipam

phpIPAM Docker image
GNU Lesser General Public License v3.0
94 stars 111 forks source link

MYSQL_ENV_MYSQL_HOST not inserted in config.php #76

Closed ybizeul closed 2 years ago

ybizeul commented 2 years ago

I don't have an explanation, but I ran into an issue where all other variables were properly inserted, but host was still set to :

$db['host'] = '127.0.0.1';

Manually running

sed -i -e "s/\['host'\] = '127.0.0.1'/\['host'\] = getenv(\"MYSQL_ENV_MYSQL_HOST\") ?: \"mysql\"/" config.php

from within the running container fixed the issue 🤷‍♂️

mkeguy106 commented 2 years ago

Yup.. I'm seeing this problem also. v1.5.0 docker image. Even though "MYSQL_ENV_MYSQL_HOST=mysql" is in my docker-compose. Seems to be ignored when creating the container.

Problem does not exist in v1.4.7

mkeguy106 commented 2 years ago

I see.. the fix is in PR 75. Just needs a new release to be pushed to docker hub. https://github.com/pierrecdn/phpipam/pull/75

pierrecdn commented 2 years ago

I updated the 1.5 tag (I know, that's bad) to rebuild images on the hub with this patch.