docker-composesmtpnginx-reverse-proxymailcow

Docker Compose Containers cannot access each other


I have three docker compose containers set up behind a nginx reverse-proxy, namely Mailcow, Nextcloud AIO and GitLab. I want to use Mailcow as the SMTP server for GitLab and Nextcloud, but both containers cannot connect to mail.domain.com:587, something that works fine outside the containers. How can i get the containers to connect?

I have already tried to create a shared network between the containers by adding mailcowdockerized_mailcow-network as external network to Nextcloud and GitLab, but with no luck


Solution

  • I had to use the container ID instead of the domain name