FastAPI Modern, fast, web framework for Python
Docker Containerization software
Heroku Hosting platform
Git (or just download the repo)
Heroku cli (to run the heroku commands)
Note: Replace your-app-name
in the instructions with the name you wish to have on your app.
-
Install git (or just downlad the repo)
-
Install Heroku cli and log in
-
Clone or download this repo.
git clone https://github.com/askblaker/fastapi-docker-heroku.git
- cd into the directory
cd fastapi-docker-heroku
- Create the heroku app
heroku create your-app-name
- Set the heroku cli git remote to that app
heroku git:remote your-app-name
- Set the heroku stack setting to container
heroku stack:set container
- Push to heroku
git push heroku main
- Enjoy your fastAPI app at https://your-app-name.herokuapp.com