Closed DavidRawling closed 6 years ago
Sorry for the delay in answering.
To me you've simply an error in your compose file, leading to a mismatch by Docker in some way.
By blindly copying your docker-compose.yml I end up having timeouts from the frontend to reach the DB in the PDO MySQL driver, like what you seem to describe.
But, if I do the same as I documented, I get:
Attaching to phpipam-mysql, phpipam
(logs stream)
And it works as expected.
So you probably forgot to add:
version: '2'
services:
(...)
on top of your docker-compose.yml
I have configured this container to run on a private network; port 80 is already in use on the host and I would prefer to have it on a private net anyway. I'm pretty sure I have the docker compose YAML configured right, but setup complains that the phpipam user is denied access.
docker-compose.yml follows:
It looks like the link to the MySQL container doesn't work completely; the container attempts to connect to the wrong IP:
Database error: Could not connect to database! SQLSTATE[HY000] [1045] Access denied for user 'phpipam'@'172.18.0.5' (using password: YES).
Note that 172.18.0.5 is the IP of the phpipam container - the MySQL container has no internal IP. The password is defined in an environment file and there are other containers using variables from that file
Suggestions welcome (and I hope this formatting works).