Skip to content

Commit da60967

Browse files
committed
Adding Blueprint (render.yaml). Closes #1
1 parent 53e2c38 commit da60967

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,7 @@ venv.bak/
102102
/site
103103

104104
# mypy
105-
.mypy_cache/
105+
.mypy_cache/
106+
107+
# Mac OS
108+
.DS_Store

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
Use this repo as a template to deploy a Python [FastAPI](https://fastapi.tiangolo.com) service on Render.
44

5-
## Steps
5+
See https://render.com/docs/deploy-fastapi or follow the steps below:
6+
7+
## Manual Steps
68

79
1. You may use this repository directly or [create your own repository from this template](https://github.com/render-examples/fastapi/generate) if you'd like to customize the code.
810
2. Create a new Web Service on Render.
@@ -11,12 +13,14 @@ Use this repo as a template to deploy a Python [FastAPI](https://fastapi.tiangol
1113
5. Specify the following as the Start Command.
1214

1315
```shell
14-
uvicorn main:app --host 0.0.0.0 --port 10000
16+
uvicorn main:app --host 0.0.0.0 --port $PORT
1517
```
1618

1719
6. Click Create Web Service.
1820

19-
See https://render.com/docs/deploy-fastapi for more details.
21+
Or simply click:
22+
23+
[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/render-examples/fastapi)
2024

2125
## Thanks
2226

render.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
# A Docker web service
3+
- type: web
4+
name: fastapi-example
5+
runtime: python
6+
plan: free
7+
buildCommand: pip install -r requirements.txt
8+
startCommand: uvicorn main:app --host 0.0.0.0 --port $PORT
9+

0 commit comments

Comments
 (0)