Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:3.8
WORKDIR /app
COPY requirements.txt ./
RUN pip3 install --no-cache-dir -r requirements.txt
COPY . .

CMD ["uvicorn", "main:app", "--reload"]
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This repo is for [Youtube FastAPI 4 hours full course](https://www.youtube.com/watch?v=7t2alSnE2-I)

## Created by [Sarthak](https://twitter.com/Sarthaksavvy)

### The Docker usage is simply based on docker-compose:

*To build the container*

```
docker-compose -f docker-compose.yaml up --build
```
It should be up now.

*To login to the container(if you want)*

```
docker-compose -f docker-compose.yaml exec /bin/bash
```


> Note: if you updated/edited the code just run the build command again to get the new changes.

11 changes: 11 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3.7"

services:
api_v1:
build:
context: .
dockerfile: Dockerfile
container_name: fastapi_bitfumes_full_course_v1
ports:
- "8000:8000"
network_mode: host