-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Opened port 25 in container to docker host (for SMTP) #2095
Conversation
Generated by 🚫 Danger |
I was researching this and I think this could be a part of the solution. Summarizing @jywarren it's a good idea but requires: |
@icarito so the problem is that : |
@namangupta01 sorry, no. We do not have another container doing smtp. So we want to access the appropriate SMTP host in each instance. This might become simpler once we have containers in production. From the plan above, the one thing that needs to be done here is to somehow see if we can setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently this would break production and doesn't by itself address the problem. Could we change smtp
for localhost
? This should work in production and is a step in the right direction because we will need to use SMTP in staging to fix the actual issue as well.
@jywarren this would change the default mail settings - perhaps it would be in order to leave a comment on how to setup sendmail instead?
@icarito I was researching over this issue, i want to know one thing where are you defining your smtp settings? In rails config files or in linux files? |
Currently since plots2 runs locally in production, it relies on |
I think directly writing the smtp setting in config files should work everywhere: |
Yeah - a sensible default would be I think having the other options as comments would be great so they are easy to figure out. |
I think using above configuration has nothing to do with whether it is running in container or directly. |
I have been using these settings in my projects and everything working fine for me https://github.com/namangupta01/MCQ/blob/master/config/environments/development.rb#L44 |
I don't know what you mean with |
What's the next step for this, do you think? Perhaps we should consider an approach that sets up a "fallback" mailing system that would be overridden by the production setup, but would silently accept mail (but not send it) from staging. What might that look like? |
Hi Jeff,
Previously I had thought this might need some kind of tunneling or
proxying but was reluctant to add complexity.
Since then we tested container in production and it had same problem,
needed access to the a docker host service (production MySQL engine in
this case).
Just a note that we need to add something like this to
`docker-compose-production.yml`
```
network_mode: "host"
```
...in order to access Docker host smtp.
In sum, we have a path forward.
Regards,
Sebastian
…On 03/03/18 09:54, Jeffrey Warren wrote:
Hi @icarito <https://github.com/icarito> if you have some time to
think about how this could work, we're hoping to test out #2257
<#2257> based on fixing mail
in staging; currently it doesn't let us test that out. What do you
think? Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2095 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMMSxQCbogkP0j2LK87fTFboyS-UDFQks5taq6ZgaJpZM4Rrl0R>.
|
OK, so should we first create a separate Thanks! |
@icarito - do we have to start version tracking |
No, we use docker-compose.yml in staging. We need to add a SMTP service
to docker-compose.yml and set networking to `host`.
…On 14/03/18 13:32, Jeffrey Warren wrote:
@icarito <https://github.com/icarito> - do we have to start version
tracking |docker-compose-production.yml| then? Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2095 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMMS1ibOEN_brAW6EXioQEx-VmzKkxLks5teWIvgaJpZM4Rrl0R>.
|
ah, perfect!
On Wed, Mar 14, 2018 at 3:20 PM, Sebastian Silva <notifications@github.com>
wrote:
… No, we use docker-compose.yml in staging. We need to add a SMTP service
to docker-compose.yml and set networking to `host`.
On 14/03/18 13:32, Jeffrey Warren wrote:
>
> @icarito <https://github.com/icarito> - do we have to start version
> tracking |docker-compose-production.yml| then? Thanks!
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#2095 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-
auth/AAMMS1ibOEN_brAW6EXioQEx-VmzKkxLks5teWIvgaJpZM4Rrl0R>.
>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2095 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ34YiIuNegRnnX9lhLC_yk6EnnASks5teW1qgaJpZM4Rrl0R>
.
|
Apologies I thought this would be simpler. The problem is that with containers SMTP won't be 127.0.0.1 unless we do some tricks that make everything more complex. See moby/moby#1143 for a discussion on this specific issue. |
Great work! Thank you!!! 👍 |
Closes #2065