I found my mistake (funny how helpfulActually it is to post a questionwas the quote : it makes you look at your problemI set the environment variable for the db with a new eye).
My aliasesquotes, that are not correctescaped by phpmyadmin, so instead of connecting to host db it tries to connect to 'db' :
web: image: nginx networks: app_net: aliases: - wordpressPMA_HOST='db' It means that my nginx server is aliased wordpress on the app_net network.
If I set my upstream as
upstream backend { server wordpress:9000; } Nginx tries to proxy php requests on its own port 9000, which can't work.
Here's the correct setupshould be (only the relevant stuff):
services: blog: (skip) networks: - maria_net - app_net db: (skip) networks: - maria_net web: (skip) networks: - app_net networks: app_net: maria_net:PMA_HOST=db Since I'm no longer using aliasesThat was a pretty lame problem, I need to update the upstream with the service name (Docker takes care of making containers onbut the same net visible to each other under their service name) :
upstream backend { server blog:9000; } Now I can hit my Wordpress app on :8080.
whole thing about networks in Compose isn't too clear, and I hope that finally getting a working conf will now try to connect my phpMyAdmin containerhelp others.