Custom Docker Network Configuration - Container to Container Comms
The discussion revolves around configuring a custom Docker network to enable container-to-container communication between Discourse and an existing SMTP server.
gaiterjones wants to connect Discourse to their existing SMTP server on a custom Docker network (mail_server). However, the SMTP server requires reverse DNS lookups, which are not working with the current setup.
mpalmer suggests that rDNS lookups are not typically a Docker concern and that the SMTP server configuration might be unusual. gaiterjones simplifies the question, explaining that they want to connect Discourse to their existing mail_server network.
Cameron_D suggests using docker network connect mail_server [discourse_container_id], which works temporarily but doesn’t persist after a bootstrap.
gaiterjones discovers that adding the network via launcher args doesn’t work, but manually connecting the network using network connect works, except that it doesn’t register the hostname with Docker’s name resolution system.
Cameron_D suggests passing --alias my_forum to the network connect command, but gaiterjones is unable to get the networks to connect using launcher network args.
Ultimately, gaiterjones resolves the issue by noticing a warning about the mail server certificate in the Discourse production logs and setting DISCOURSE_SMTP_ENABLE_START_TLS to false, allowing mail to be delivered.