Tag/version of Container Images
0.4.* but I believe 0.3.* is also affected
Currently ALLOWED_HOSTS hardcodes mailman-web which means you cannot use host networking or name your containers with different names. In particular it is the gethostbyname() call that fails because mailman-web does not resolve when using host networking or when you name the container differently.
In our proof of concept deployment I was able to modify names and urls using existing environment variables for everything else that needs to know where the web container is located. This usage was the only one that required me to replace the settings.py file. In particular we cannot use settings_local.py here because the settings.py definition of ALLOWED_HOSTS is always evaluated.
I'm not sure what the best way to address this would be to maintain backward compatibility. I think the best option may be to see if mailman-web resolves and if so add both the name and IP address to ALLOWED_HOSTS otherwise leave it out. That way we can catch and handle the gethostbyname() error if the name isn't valid.
I'm happy to submit a PR to address this, but was hoping for a bit of direction on the best approach before I did that.
Tag/version of Container Images
0.4.* but I believe 0.3.* is also affected
Currently ALLOWED_HOSTS hardcodes mailman-web which means you cannot use host networking or name your containers with different names. In particular it is the
gethostbyname()call that fails becausemailman-webdoes not resolve when using host networking or when you name the container differently.In our proof of concept deployment I was able to modify names and urls using existing environment variables for everything else that needs to know where the web container is located. This usage was the only one that required me to replace the
settings.pyfile. In particular we cannot usesettings_local.pyhere because thesettings.pydefinition ofALLOWED_HOSTSis always evaluated.I'm not sure what the best way to address this would be to maintain backward compatibility. I think the best option may be to see if
mailman-webresolves and if so add both the name and IP address toALLOWED_HOSTSotherwise leave it out. That way we can catch and handle thegethostbyname()error if the name isn't valid.I'm happy to submit a PR to address this, but was hoping for a bit of direction on the best approach before I did that.