https://github.com/porter-dev/fastapi-example
This example repository provides a boilerplate FastAPI server with a Dockerfile that can be deployed to Porter with one-click.
https://github.com/porter-dev/fastapi-example
Last synced: 11 months ago
JSON representation
This example repository provides a boilerplate FastAPI server with a Dockerfile that can be deployed to Porter with one-click.
- Host: GitHub
- URL: https://github.com/porter-dev/fastapi-example
- Owner: porter-dev
- Created: 2023-07-25T20:41:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-10T02:00:45.000Z (about 2 years ago)
- Last Synced: 2025-04-20T17:54:51.991Z (11 months ago)
- Language: Python
- Size: 15.6 KB
- Stars: 2
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to Deploy
For a complete guide, check out our [docs](https://docs.porter.run/language-specific-guides/fastapi).
## Create an account on Porter
Unlike other PaaS options, Porter deploys your applications to your own AWS account. Before deploying a FastAPI application you must set up your infrastructure on AWS first.
First, create an account on [Porter](https://dashboard.getporter.dev). Follow [this guide](https://docs.porter.run/standard/getting-started/deploy-overview) to create the necessary infrastructure on AWS.
## Deploying from the dashboard
Once your infrastructure has been provisioned on AWS, you can start deploying your FastAPI application. Take a look here for a more [detailed guide](https://docs.porter.run/standard/getting-started/deploy-overview).
1. Create a New Application on Porter.
2. Select the Git repository you have forked from the example repo.
3. Add a Web service to the application. There is no need to add a start command, because the `Dockerfile` in the example repository already has a command specified.
4. Click Deploy.
That's it! You should be able to see your FastAPI server on a Porter URL that ends with `onporter.run`. Verify that the application has been deployed by going to the `/docs` page on your application, which will show the auto-generated docs as below: