Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/askblaker/fastapi-docker-heroku
https://github.com/askblaker/fastapi-docker-heroku
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/askblaker/fastapi-docker-heroku
- Owner: askblaker
- Created: 2020-11-27T14:49:15.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-06T09:58:42.000Z (almost 3 years ago)
- Last Synced: 2024-05-02T15:26:27.005Z (7 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 13
- Watchers: 1
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Deploy fastAPI to Heroku using Docker
[FastAPI](https://fastapi.tiangolo.com/) Modern, fast, web framework for Python
[Docker](https://www.docker.com/) Containerization software
[Heroku](https://www.heroku.com/) Hosting platform## Requirements
[Git](https://git-scm.com/) (or just download the repo)
[Heroku cli](https://devcenter.heroku.com/articles/heroku-cli) (to run the heroku commands)## Instructions
Note: Replace `your-app-name` in the instructions with the name you wish to have on your app.
1. Install git (or just downlad the repo)
2. Install [Heroku cli](https://devcenter.heroku.com/articles/heroku-cli) and [log in](https://devcenter.heroku.com/articles/heroku-cli#getting-started)3. Clone or download this repo.
```bash
git clone https://github.com/askblaker/fastapi-docker-heroku.git
```4. cd into the directory
```bash
cd fastapi-docker-heroku
```5. Create the heroku app
```bash
heroku create your-app-name
```6. Set the heroku cli git remote to that app
```bash
heroku git:remote your-app-name
```7. Set the heroku stack setting to container
```bash
heroku stack:set container
```8. Push to heroku
```bash
git push heroku main
```9. Enjoy your fastAPI app at [https://your-app-name.herokuapp.com](https://your-app-name.herokuapp.com)