Skip to content

Conversation

@swallez
Copy link
Contributor

@swallez swallez commented Jul 22, 2025

Fixes #165

Introduces a new --container-mode CLI flag, with the associated CONTAINER_MODE environment variable.

It's meant to enable some default values and behaviors that are more suited/needed when running in a container:

  • change the default listen address from 127.0.0.1 to 0.0.0.0 (this was done previously automatically with the in_container crate)
  • rewrite ES_URL containing localhost to the hostname of the container host (host.docker.internal for Docker, host.containers.internal for Podman, more can be added in the future).

The Dockerfiles have also been updated to have ENV CONTAINER_MODE=true

Also updates the Dockerfile's dependency caching so that it actually works 😅

@swallez swallez requested a review from JoshMock July 22, 2025 17:01
Copy link
Member

@JoshMock JoshMock left a comment

Choose a reason for hiding this comment

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

LGTM 👏

@swallez swallez added the environment Regarding where or how this server can be run or hosted label Jul 22, 2025
@swallez swallez merged commit a7958d9 into main Jul 22, 2025
2 checks passed
@swallez swallez deleted the container-mode branch July 22, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

environment Regarding where or how this server can be run or hosted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename localhost to host.docker.internal when running in a container

3 participants