added docker support (#9)

This commit is contained in:
Lorenzo Corrias 2024-12-10 15:56:16 +01:00 committed by GitHub
parent 64c74682b6
commit 518cce5d4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 0 deletions

10
Dockerfile Normal file
View file

@ -0,0 +1,10 @@
FROM python:3.12
WORKDIR /app
COPY src/ ./
COPY requirements.txt ./
RUN pip install -r requirements.txt
CMD ["uvicorn", "main:app", "--reload"]

View file

@ -41,6 +41,20 @@ cd src
uvicorn main:app --reload
```
The application will be available at `http://localhost:8000`
### Docker
1. Build the image:
```
docker build -t gitingest .
```
2. Run the container:
```
docker run -d --name gitingest -p 8000:8000 gitingest
```
The application will be available at `http://localhost:8000`
## ✔️ Contributions are welcome!