Skip to content

Commit

Permalink
add docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hebertcisco committed Dec 29, 2023
2 parents 5b52251 + ddbf40d commit a1405e4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
tasks:
- init: pip install -r requirements.txt


- init: docker-compose up
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ This example uses the Web Server Gateway Interface (WSGI) with FastApi to enable

## Running Locally

### With Docker Compose

```bash
docker-compose up
```

### With Docker

```bash
# Build the Docker image
docker build -t deploy-python-fastapi-in-vercel .
Expand All @@ -66,6 +73,7 @@ docker run -p 8000:8000 deploy-python-fastapi-in-vercel
```bash
pip install -r requirements.txt
```

```bash
uvicorn main:app --host 0.0.0.0 --port 8000
```
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
services:
web:
build: .
ports:
- "8000:8000"

1 comment on commit a1405e4

@vercel
Copy link

@vercel vercel bot commented on a1405e4 Dec 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.