reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Configure special REFLEX_API_URL value when building Docker image.

Open unraiders opened this issue 5 months ago β€’ 4 comments

Describe the Features Where if the REFLEX_API_URL is set to some special value, then the frontend would always try to connect back on itself. maybe something like REFLEX_API_URL=:// could indicate "reuse the schema and hostname of the frontend"

  • What is the purpose of the feature? The purpose of this is to be able to change the container's host port once the Docker image has been generated. We are currently bound to the port specified in the Dockerfile.

  • Show an example / use cases for the new feature. docker run -p 1234:8080

Additional context I understand that the Reflex framework can be perfectly used in homelab environments where it is common to have the host port customization available when launching a container.

unraiders avatar Jul 10 '25 08:07 unraiders

That would be ideal to be able to set up Docker containers with customized host ports

dgongut avatar Jul 10 '25 09:07 dgongut

reuse the schema and hostname of the frontend

is that the limit of the feature request?

adhami3310 avatar Jul 10 '25 17:07 adhami3310

is that the limit of the feature request?

Well, according to @masenf comment at https://github.com/reflex-dev/reflex/issues/5536, I understand that it is.

What I'm clear about is the need: that once the Docker image is generated and uploaded to Dockerhub, anyone who executes "docker run -p <any_port>:8080" on a host port other than 8080 on a local server doesn't break communication with the backend, as would happen with any Docker installation that maps ports between the host and the container.

I'm not a technician; my development is a hobby to share apps with the community.

Thanks.

unraiders avatar Jul 11 '25 05:07 unraiders