phoscon-app-beta
phoscon-app-beta copied to clipboard
Allow setting a custom address / hostname for web app
I'm using deconz-docker image with Traefik as reverse proxy.
deconz:
image: "marthoc/deconz"
restart: "unless-stopped"
volumes:
- "deconz:/root/.local/share/dresden-elektronik/deCONZ"
devices:
- "/dev/ttyACM0"
environment:
- "DECONZ_WEB_PORT=8080"
- "DECONZ_WS_PORT=443"
- "DECONZ_DEVICE=/dev/ttyACM0"
- "TZ=Europe/Berlin"
- "DEBUG_INFO=1"
- "DEBUG_APS=0"
- "DEBUG_ZCL=0"
- "DEBUG_ZDP=0"
- "DEBUG_OTAU=0"
labels:
- "traefik.enable=true"
- "traefik.http.routers.deconz.rule=Host(`deconz.haeckerfelix.de`)"
- "traefik.http.routers.deconz.entrypoints=websecure"
- "traefik.http.routers.deconz.tls=true"
- "traefik.http.services.deconz.loadbalancer.server.port=8080"
networks:
web:
ipv4_address: "172.18.0.5"
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:
- Open Firefox inspector
- Click on Web-Storage tab
- Click on local storage
- Replace IP address with traefik / "external" dns name
I changed this
to this
... and I was able to use the web app through my traefik reverse proxy! :tada:
Therefore I wonder
- if we can add an input entry or something on the gateway page to enter a custom address?
- if we can configure a custom address directly? (eg. by setting a docker env variable like
DECONZ_ADDRESS=deconz.haeckerfelix.de
), so we don't need any workaround?