DEV Community

Bola Olatunji
Bola Olatunji

Posted on

Deploy Fullstack FastAPI Application On Render For Free in 10 minutes.

Introduction:

Render is a Platform As A Service which helps developers eliminate the complexities of deployment and allows more focus on building good applications.

FastAPI is a python web framework specifically known for its speed and automatic API documentation. Other awesome features include easy dependency injection and data validation thanks to Pydantic.

That being said, lets get right to deployment!

Link to deployed app: https://swish-taskapp.onrender.com

Deployment Process

  1. Log into render.com and navigate to dashboard and if you are new to render, create an account with your github profile.
  2. Return to dashboard after sign in and select "New Web Service" select new web service
  3. Next is to select how you wish to build the web service and you can select "Build and deploy from github repository" and click next. Build and deploy
  4. Connect your repository. connect repo
  5. You can decide to grant access to the entire repository or just the one you wish to deploy. In my case, I selected on the repository I wished to deploy and click install at the bottom of the page. select repo
  6. Once all authentication is complete you click connect and move to the deployment settings. connect
  7. Now, you get to configure the deployment and this is pretty straight forward as shown below. configure deployment
  8. Further deployment setting are shown below and are project dependent mostly. My app runs on uvicorn hence the commands are as follows: runtime code
  9. Next is to select free plan. Which is low performance but great for regular projects that don't require heavy functionality. select free plan
  10. Click create and voila, your service will begin deployment! click create

Runtime Code:

pip install -r requirements.txt

uvicorn main:app --host 0.0.0.0 --port 10000

Deployment log

You can view the progress of your deployment in the logs as shown below. While deploying you get to see the success of your deployment.
deployment log

After successful deployment, your service will be live and accessible at the url. The live service indication is also shown in the log terminal.
live service

Congratulations!! You have successfully deployed your web
service for free on render in a few minutes!

Top comments (0)