-
Notifications
You must be signed in to change notification settings - Fork 5
Allow setting a custom address / hostname for web app #413
Comments
+1 from me, but i had to change the port too, so it connected to traefik's "outside" endpoint and not to port 8081. |
As there hasn't been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs. |
This issue still exists, so please don't close it dear stale bot :) |
Yes pls make this possible :) And thanks for the workaround! |
This bug has annoyed my for a long time... so I came up with this solution: Basically, i put my deCONZ Gateway into the FROM marthoc/deconz:amd64-2.13.01
RUN sed -i "s/var toCheck = \[\];/var toCheck = \['my.deconz.host.example.com'\];/" /usr/share/deCONZ/webapp/pwa/login.html Maybe @marthoc is interested to implement this fix into his Docker image. I'm pretty sure someone smarter than me can figure out how to create the desired |
This could be done with the help of an environment variable, and putting this sed command into the start.sh script of the dockerfile, for example here Just add the sed command there, and replace the After building the image and executing, you can specify the host in the env variable on runtime, and the entrypoint script will replace the value every time the container starts. Maybe you need to add a catchall regex to the source part of sed, since after the first execution of the container, it won't have the I have little time, and this design to have three different Dockerfiles and three different entrypoint scripts is uncomfortable, so i'll leave the actual implementation to someone else. |
Thank you for the hints for a solution to have a host URL working for the deconz docker image. Maybe the issue should be put to https://github.com/deconz-community/deconz-docker/issues because it seems to be only for adjusting the Dockerfile and docker start.sh I have tried to build a deconz image locally with the sed command provided here and it was a bit tricky, because putting it just in the entry script before deconz is started will not have any effect. Therefore I had to put deconz in the background and wait some seconds (20 might be too much, but it was for testing and making sure it will be propagated after the Phoscon Webapp is up) and execute the sed command. It is now working as expected with the proxied URL (I am using traefik with SSL). It is also working for restart of the container (docker restart deconz). I have not yet done a negative test without setting the variable, but when it defaults to 0 the sed command will not be triggered. Here are my changes: In the dockerfile I have just added the environment variable:
The startup script was a bit tricky basically the functional work around are the following lines at the end. Probably with putting the deconz app in the background it is not the best way to do it. First I have echoed the WebAddress so it is logged. I also put a comment with echo when the var toCheck was set.
As this is my first proposal for changing the docker file and script someone with more experience should have look at it before opening a pull request to the docker image. |
As there hasn't been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs. |
Again - This issue still exists, so please don't close it dear stale bot :) |
As there hasn't been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs. |
No, the issue is still existing |
I'm using deconz-docker image with Traefik as reverse proxy.
By default the web app only finds the service with the docker internal network ip address
172.18.0.5
which you cannot use (login / clicking on the gateway tile does nothing)I found this workaround though:
I changed this
to this
... and I was able to use the web app through my traefik reverse proxy! 🎉
Therefore I wonder
DECONZ_ADDRESS=deconz.haeckerfelix.de
), so we don't need any workaround?The text was updated successfully, but these errors were encountered: