Is that sql docker exposed to the Internet or is there another network other than ‘web’ ?
The only exposed containers are (usually) Traefik (80, 443). There is a docker network where traefik talks to all containers handling HTTP traffic.
Other containers run in their own separate docker networks.