Deploy Fullstack FastAPI Application On Render For Free in 10 minutes.
Bola Olatunji
Posted on May 6, 2024
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
- Log into render.com and navigate to dashboard and if you are new to render, create an account with your github profile.
- Return to dashboard after sign in and select "New Web Service"
- 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.
- Connect your repository.
- 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.
- Once all authentication is complete you click connect and move to the deployment settings.
- Now, you get to configure the deployment and this is pretty straight forward as shown below.
- Further deployment setting are shown below and are project dependent mostly. My app runs on uvicorn hence the commands are as follows:
- Next is to select free plan. Which is low performance but great for regular projects that don't require heavy functionality.
- Click create and voila, your service will begin deployment!
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.
After successful deployment, your service will be live and accessible at the url. The live service indication is also shown in the log terminal.
Congratulations!! You have successfully deployed your web
service for free on render in a few minutes!
Posted on May 6, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.