Skip to content

Commit

Permalink
feat: Docker deployment script added
Browse files Browse the repository at this point in the history
  • Loading branch information
Apfirebolt committed Sep 3, 2022
1 parent 591f05a commit 855fc70
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
FROM python:3.9

#
WORKDIR /code

#
COPY ./requirements.txt /code/requirements.txt

#
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

#
COPY ./ /code/app

#
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ Following resources were used for motivation in designing this API.
- [Fast API Official Website](https://fastapi.tiangolo.com/)
- [Udemy Course - FastAPI](https://www.udemy.com/course/fastapi-the-complete-course/)

## Docker Deployment

- 3/9/22 : Added Docker deployment script for FAST API.

```
# Build the Docker image from the given file
docker build -t fast-image .
# Run container from the image created
docker run -d -p 80:80 --name my-fast-api fast-image
```

## Authors

* **Amit Prafulla (APFirebolt)** - [My Website](https://apgiiit.com)
Expand Down

0 comments on commit 855fc70

Please sign in to comment.