hassio-addons
hassio-addons copied to clipboard
✨ [REQUEST] Tandoor Recipes disable Gunicorn Media
Checked
- [X] If a new addon, I have checked on Google that such as addon doesn't already exists
- [X] If a new feature, I have searched in the discussions & issues that it was not already covered
Which addon?
Tandoor Recpipes
Is your feature request related to a problem? Please describe
As per the information available here: https://docs.tandoor.dev/install/docker/#nginx-vs-gunicorn and at the associated links, it's recommended to not serve data via Gunicorn Media. It is apparently less safe, and possibly not as performative as using nginx. However, homeassistant addon installs are likely to only be supporting small userbases (e.g. <10 users per instance), so performance may not be an issue.
Describe the solution you'd like
To disable gunicorn media, there are two things that need to be done:
- set GUNICORN_MEDIA to 0 in the environment files
- host an nginx server (other servers are available) to host the media files.
My suggestion is to implement the following:
- add
"GUNICORN_MEDIA": "1"
to theoptions
in config.json, not forgetting your commas. This will leave Gunicorn Media enabled by default. - add
"GUNICORN_MEDIA": "list(1|0)",
to theschema
in config.json, not forgetting your commas - add
export GUNICORN_MEDIA=$(bashio::config 'GUNICORN_MEDIA') && bashio::log.blue "GUNICORN_MEDIA=$GUNICORN_MEDIA"
to 99-run.sh
And then to test this with a separate nginx server such as nginx proxy manager.
I am submitting this as an issue instead of a pull request, as I've been unable to test this successfully on my own with vscode. I was able to start the instance and get in to tandoor, but in the limited time I had, I could not get nginx proxy manager working in vscode, and no matter which setting I chose, I still had GUNICORN_MEDIA showing as true
in the system settings in Tandoor.
An alternative to the above would be to implement an additional nginx server, either within the docker container or outside, that points to the /media/ location within Tandoor. This may already be partially implemented due to the attempted Ingress work that's occurred previously.
additionally, implement the DOCS.md
pull request: https://github.com/alexbelgium/hassio-addons/pull/886
To confirm, the DOCS.md changes were a bit premature - I don't think this functionality was implemented yet, so the config parameter GUNICORN_MEDIA
doesn't exist in the addon yet, right?
The config parameter GUNICORN_MEDIA exists in Tandoor, I can't confirm that it works in the tandoor add-on to home assistant.
If I recall correctly the dev of Tandoor itself recently changed the install to remove one of the gunicorn options, can't quite remember the extent of it.