Skip to content

Commit a1405e4

Browse files
committed
add docker-compose.yml
2 parents 5b52251 + ddbf40d commit a1405e4

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.gitpod.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
tasks:
2-
- init: pip install -r requirements.txt
3-
4-
2+
- init: docker-compose up

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@ This example uses the Web Server Gateway Interface (WSGI) with FastApi to enable
4949

5050
## Running Locally
5151

52+
### With Docker Compose
53+
54+
```bash
55+
docker-compose up
56+
```
57+
5258
### With Docker
59+
5360
```bash
5461
# Build the Docker image
5562
docker build -t deploy-python-fastapi-in-vercel .
@@ -66,6 +73,7 @@ docker run -p 8000:8000 deploy-python-fastapi-in-vercel
6673
```bash
6774
pip install -r requirements.txt
6875
```
76+
6977
```bash
7078
uvicorn main:app --host 0.0.0.0 --port 8000
7179
```

docker-compose.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
services:
2+
web:
3+
build: .
4+
ports:
5+
- "8000:8000"

0 commit comments

Comments
 (0)