Puma binding to 127.0.0.1:5000 instead of 0.0.0.0:5000 in Postal 3.3.4 Docker deployment #3321
Unanswered
Ouniit03
asked this question in
Help with using Postal
Replies: 1 comment 1 reply
-
I don't think you should supply both a config file and environment variables, that is probably confusing things. The config file is a bit different to how you have it, have a look at Lines 37 to 41 in fd3c7cc |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Environment
Postal Version: 3.3.4
Deployment Method: Docker Compose / docker run
Image: ghcr.io/postalserver/postal:3.3.4
OS: Linux #17~24.04.2-Ubuntu
Docker Version: Docker version 26.1.3
Relevant Configuration
postal.yml (located at /opt/postal/config/postal.yml):
docker-compose.yml (postal-web section):
Troubleshooting Steps Taken
1.Configuration Verification:
Verified that the configuration file is correctly mounted inside the container by running cat /config/postal.yml, which confirmed the web.bind is set to "0.0.0.0:5000".
2.Environment Variables Check:
Inside the container, env | grep -i 'WEB_BIND|POSTAL_WEB_BIND' shows both variables set to 0.0.0.0:5000.
3.Docker Port Mapping:
docker ps confirms the host port mapping as 0.0.0.0:5000->5000/tcp.
4.Direct Container Test:
Ran the following command to test directly:
However, the logs show:
indicating that Puma still binds to 127.0.0.1:5000 instead of 0.0.0.0:5000.
5.Alternate Parameter Attempts:
I attempted adding command-line options like --host 0.0.0.0 --port 5000, but the logs still show Puma binding to 127.0.0.1:5000.
6.Port Mapping Check with Other Images:
I confirmed that Docker's port mapping works correctly by testing with an nginx container on the same port.
Problem Description:
Even though both postal.yml and docker-compose.yml (and the corresponding environment variables) are set to bind to 0.0.0.0:5000, Puma still ends up binding to 127.0.0.1:5000 within the container. This causes external connections (via Docker port mapping) to fail. Is this behavior a known issue or bug in Postal 3.3.4? Are there any recommended workarounds or fixes?
Thanks for your assistance!
Beta Was this translation helpful? Give feedback.
All reactions