Skip to content

Conversation

@slint
Copy link
Member

@slint slint commented Oct 12, 2025

  • Binds 127.0.0.1 as the host IP for all mapped service ports in
    Docker Compose files.
  • Allows overriding the host IP using the DOCKER_SERVICES_IP_BIND
    environment variable.

* Binds `127.0.0.1` as the host IP for all mapped service ports in
  Docker Compose files.
* Allows overriding the host IP using the `DOCKER_SERVICES_IP_BIND`
  environment variable.
@carlinmack carlinmack moved this to In review 🔍 in Sprint Q1/2026 Oct 13, 2025
@slint slint merged commit a27be6b into zenodo:master Oct 14, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from In review 🔍 to To release 🤖 in Sprint Q1/2026 Oct 14, 2025
@slint slint deleted the host-port-fix branch October 14, 2025 08:15
@slint slint moved this from To release 🤖 to Released ✔️ in Sprint Q1/2026 Oct 14, 2025
image: zenodo:latest
ports:
- "5000"
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:5000"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really working for you, or will you get Bind for 127.0.0.1:5000 failed: port is already allocated?

Suggested change
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:5000"
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:5001:5000"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I didn't test the "full" version of the setup actually 🙈

It should be separate ports, though this UI/API separation hasn't done us any good as a recommendation. E.g. on Zenodo we see equivalent usage, so splitting into separately scalable groups is not utilized... I'll fix here and in the cookiecutter and ask some folks if they see why we shouldn't just keep one container with UI + API app.

image: zenodo:latest
ports:
- "5000"
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:5000"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:5000"
- "${DOCKER_SERVICES_IP_BIND:-127.0.0.1}:5000:5000"

Without this, I will get invalid hostPort: 127.0.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants