Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open port 25 in container to docker host (for SMTP) #2065

Closed
icarito opened this issue Jan 22, 2018 · 5 comments
Closed

Open port 25 in container to docker host (for SMTP) #2065

icarito opened this issue Jan 22, 2018 · 5 comments
Labels
more-detail-please issue lacks proper description and perhaps needs code links or the location of the problem systems

Comments

@icarito
Copy link
Member

icarito commented Jan 22, 2018

Please describe the problem (or idea)

Staging container should try to use localhost email facility. Currently it errors (see #1570 )

@namangupta01
Copy link
Member

@icarito As you said we are using SMTP server on production and its running on port 25. I think to open that port there would also be the need for the Docker container's address running on port 25 and address of docker container can be specify by name of the Docker Container. So i think name of docker container is also required to open the port?

@namangupta01
Copy link
Member

Never mind i got it.
It is address: "smtp"

@jywarren
Copy link
Member

Hi, i see your PR but wouldn't this affect production while we are only interested in doing this for staging? Perhaps we need a bit more input from @icarito before moving forward on this. But thank you!

@jywarren jywarren added the more-detail-please issue lacks proper description and perhaps needs code links or the location of the problem label Jan 25, 2018
@icarito
Copy link
Member Author

icarito commented Jan 25, 2018

Thanks for your initiative.
The issue is staging is run in a container so we need a way for this container to access the mail service on port 25 at the docker host. So this issue is about configuring docker to allow access to the docker host (usually at IP 172.17.42.1 but need some checking).
Your idea of naming a host as smtp by default is good, although localhost is a more conventional choice for a hosted platform.

@icarito
Copy link
Member Author

icarito commented Jan 25, 2018

https://stackoverflow.com/questions/17770902/forward-host-port-to-docker-container documents a way to do this modifying the docker-compose.yml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-detail-please issue lacks proper description and perhaps needs code links or the location of the problem systems
Projects
None yet
Development

No branches or pull requests

3 participants