This also exposes the Keila to the world without the need to go through Traefik, because its equivalent to "0.0.0.0:4040:4040". To be only localhost you need to use instead "127.0.0.1:4040:4040", but if the goal is to only have Traefik talking with Keila then you can just simply remove `“4040:4040”.
Regarding Postgres Database you are also exposing it to the world. To communicate with the database from Keila just use the service name postgres_keila has the host on your code, and remove the ports from your docker compose file.






















