I started by creating a service running a single wordpress container and it worked. Wordpress could connect to the database, and show the pages i wanted.
Now, after adding an nginx proxy to enforce basic authentication, suddendly i get the usual “could not connect to database page”, the one saying that class-phpdb.php does not exist but maybe it is the database’s fault.
Ok, so what i tried then was to run a single mysql container with a script as startup command, which got me the output i was looking for. And once again, after adding another container (the proxy because i was lazy) the output was: “Can’t connect to local MySQL server through socket ‘/cloudsql/project:region:dbname’”
So the next idea was to do all the tests done before by replacing the startup command with an “ls -l /cloudsql” command and of course i got what i expected, said a find in single container pods, and a no such file in dual container pods.
Also i had made these test both with a single container database mount an dual, just to put aside the hypothesis where concurrent mounts were impossible.
Has anyone of you met this issue or know why it happens ?