PDOConnection.php does not inherit DB_HOST Docker Variable
GoingOffRoading opened this issue · comments
-
Problem: Whats wrong?
The Maria/mysql DB is not accessible via localhost. Instead, for the Docker Image eveseat/seat:4, I am passing the Variable DB_HOST for database host IP to the Seat container when the container starts. I know this is working correctly/as expected because I am passing the "# Wait for MySQL" test in the docker-entrypoint.sh on container build without errors. However when start_web_service starts, the container crashes because PDOConnection.php is looking for the database on local host, instead of at the IP passed for DB_HOST. -
Expected: What did you expect to happen?
I expected PDOConnection.php to use the database IP I passed using DB_HOST, instead of a hard-coded local host value.
- Logs / Screenshots / Proof: The more information you give the better!
This is a deployment to Kuberentes, so the kubectl logs is equivalent to sudo docker container logs
~$ kubectl logs --follow -l app=dwseatweb -n dw
SQLSTATE[HY000] [1045] Access denied for user 'seat'@'10.40.0.0' (using passw
ord: YES)
In PDOConnection.php line 40:
SQLSTATE[HY000] [1045] Access denied for user 'seat'@'10.40.0.0' (using passw
ord: YES)
- Version Info: PHP Version, SeAT Version, Operating System etc.
Docker Image "eveseat/seat:4"
Please feel free to resolve this issue
The issue here is that I brain farted and used LinuxServer's Maria DB Docker Image instead of the Maria DB official Docker Image.
I don't know what LinuxServer changes in their implentation, but when I switched to the official image, Seat -web worked just fine