fix(web): pass create_app as a hypercorn factory (backend.app:create_app())
This commit is contained in:
+4
-1
@@ -9,11 +9,14 @@ case "$ROLE" in
|
|||||||
echo "[entrypoint] Running alembic upgrade head"
|
echo "[entrypoint] Running alembic upgrade head"
|
||||||
alembic upgrade head
|
alembic upgrade head
|
||||||
echo "[entrypoint] Starting hypercorn on :8080"
|
echo "[entrypoint] Starting hypercorn on :8080"
|
||||||
|
# create_app is a factory — the `()` tells hypercorn to call it once
|
||||||
|
# and serve the returned Quart (ASGI) app, rather than treating the
|
||||||
|
# function itself as the application (which it then mis-invokes as WSGI).
|
||||||
exec hypercorn \
|
exec hypercorn \
|
||||||
--bind 0.0.0.0:8080 \
|
--bind 0.0.0.0:8080 \
|
||||||
--workers "${HYPERCORN_WORKERS:-2}" \
|
--workers "${HYPERCORN_WORKERS:-2}" \
|
||||||
--access-logfile - \
|
--access-logfile - \
|
||||||
backend.app:create_app
|
"backend.app:create_app()"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
worker)
|
worker)
|
||||||
|
|||||||
Reference in New Issue
Block a user