Docker, mysql, apache and connection January 17, 2024, 04:21:50 pm Hey all!I've finally found some time to set up a NAS-like Frankenstein and I slapped on it unraid for testing it and see if it fits with what I had in mind.And so I started immediately trying php and mysql to finally set up again a place I could use to develop some code (scared, right? ).Though, I'm facing a bit of a problem with docker (that I'm quite the noob about) and can't understand most of the instructions I find on line...So, I'm running unraid and installed 3 docker containers:# ApachePHP8 (192.168.1.250 <-> 192.168.1.250)# MariaDB (172.17.0.3 <-> 192.168.1.136)# phpmyadmin (172.17.0.2 <-> 192.168.1.136)The latest two talk happily and I can access the db from phpmyadmin, though the apachephp one doesn't connect to mariadb.The only thing that differs are the IPs, mariadb and phpmyadmin have the same IP 192.168.1.136 and work on different ports, while the apachephp has its own 192.168.1.250.Could it be that this is the issue?Any idea how to convince mariadb docker to accept connections from php?
Re: Docker, mysql, apache and connection Reply #1 – January 17, 2024, 05:01:50 pm You can set up an internal docker lan. https://docs.docker.com/compose/networking/Or do links both are described on that link. The issue is that they’re not all on the 172.x.x.x lan
Re: Docker, mysql, apache and connection Reply #2 – January 17, 2024, 06:13:26 pm This may help ... https://github.com/Spuds/Docker-ElkArte/tree/php82Look at the docker-compose.yml to see how to connect things together.
Re: Docker, mysql, apache and connection Reply #3 – January 17, 2024, 06:47:03 pm I should note, in that setup the $db_server would be db that is what you would use in something like Settings.php when to use adminer you would navigate to 123.123.123.123:8080and sphinx server would be sphinxand mailhog (a way to test smtp) would be at 123.123.123.123:8025 and you would setup the mail server as 123.123.123.123 port 1025 in the ACP
Re: Docker, mysql, apache and connection Reply #4 – January 18, 2024, 03:28:38 pm Well... I did what I'm best at doing: I screwed up everything and had to restart from zero.then, I realized the only issue was I used entirely different networks when I should have just used the same and set different IPs.Well, me and networks are not exactly friends.