diff --git a/entrypoint.sh b/entrypoint.sh index 3d9cdf5..fc9e8b7 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -9,11 +9,14 @@ case "$ROLE" in echo "[entrypoint] Running alembic upgrade head" alembic upgrade head 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 \ --bind 0.0.0.0:8080 \ --workers "${HYPERCORN_WORKERS:-2}" \ --access-logfile - \ - backend.app:create_app + "backend.app:create_app()" ;; worker)