So my python web service (FastAPI) has the following deploy command:
echo $PORT && gunicorn app.main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT
I keep getting the following output:
==> No open ports detected, continuing to scan...
==> Docs on specifying a port: https://render.com/docs/web-services#port-binding
Matplotlib is building the font cache; this may take a moment.
==> No open ports detected, continuing to scan...
==> Docs on specifying a port: https://render.com/docs/web-services#port-binding
==> Port scan timeout reached, no open ports detected. Bind your service to at least one port. If you don't need to receive traffic on any port, create a background worker instead.
==> Docs on specifying a port: https://render.com/docs/web-services#port-binding
==> Timed out: Port scan timeout reached, no open ports detected. Bind your service to at least one port. If you don't need to receive traffic on any port, create a background worker instead.
==> Common ways to troubleshoot your deploy: https://render.com/docs/troubleshooting-deploys
I tried the following build command variants which did not make any changes:
echo $PORT && gunicorn app.main:app --bind 0.0.0.0:$PORT --workers 4 --worker-class uvicorn.workers.UvicornWorker
echo $PORT && gunicorn app.main:app --bind 0.0.0.0:${PORT:-10000} --workers 4 --worker-class uvicorn.workers.UvicornWorker
echo $PORT && gunicorn app.main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 127.0.0.1:$PORT
The echo $PORT
displays the port so I am a bit lost as to why the rest is not working as I copy pasted from an old web service which didn’t face this issue.
Gunicorn version 23.0.0, Uvicorn version 0.34.0, Python version 3.10.11