I’ve created an addon that serves (and formats) documentation. Source is at hass-addons/doc-viewer at main · iot49/hass-addons · GitHub.
The addon works fine, but I would like to address two issues:
I’d like a link in the left panel of the Home Assistant ui. Apparently this requires enabling “ingress”.
Currently my configuration contains:
webui: "http://[HOST]:[PORT:8000]"
ports:
8000/tcp: 8000
Replacing this with
ingress: true
ingress_port: 8000
breaks the addon, it now returns a 503 status.
The addon is based on a fastapi server with command
CMD ["./bin/python3", "-m", "gunicorn", "main:app", "--bind", "0.0.0.0:8000", \
"--workers", "2", "--worker-class", "uvicorn.workers.UvicornWorker", \
"--preload", "--log-level", "warning"]
i.e. it should allow connections from any port. This gets me to the 2nd issue: how can I make the addon ui available only to users authenticated with Home Assistant?