Trouble deploying FastAPI app

Hello Community

I am struggling to deploy a FastAPI app on Render. Everytime I try to deploy it, I get the error message
[notice] To update, run: pip install --upgrade pip
==> Publish directory python main.py does not exist!
==> Build failed :disappointed:
==> Common ways to troubleshoot your deploy: https://docs.render.com/troubleshooting-deploys

The app script is main.py

The deployment variables are set to
Build Command : pip install -r requirements.txt
Publish Directory : python main.py

I don’t know what is going on wrong!

Can somebody please explain me?

python main.py is not a Directory.

You want a Web Service, not a Static Site, and that value as the Start Command.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.