Closed lucaswerkmeister closed 2 years ago
The recommended run command when installing manually, and the one used in the docker container, should probably instead be:
hypercorn -b localhost:8000 app:app
If the venv is used correctly, hypercorn
should be in the PATH already. (This also binds only to localhost instead of all interfaces, which I think is preferable. Exposing to the internet should IMHO be left to a proxy server that also handles HTTPS.)
Thanks! It is funny you open this, I just wanted to document deployment better a few days ago (https://github.com/wetneb/openrefine-wikibase/issues/125). I have not tried deploying it with hypercorn
yet, for now I am using gunicorn
.
I mainly went for hypercorn because it’s already in the .venv/bin
(though I don’t remember how I found it there… I think it might have been somewhere in the default app.py
output?). I wouldn’t mind gunicorn either :shrug:
According to the Quart docs, debug mode “should/must be
False
in production”, yetapp.py
unconditionally sets it toTrue
in its call toapp.run()
at the end of the file. This seems like a bad idea.