From 518cce5d4b100aeead3443c2bcf1c01c681c1a17 Mon Sep 17 00:00:00 2001 From: Lorenzo Corrias <32979892+lore-corrias@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:56:16 +0100 Subject: [PATCH] added docker support (#9) --- Dockerfile | 10 ++++++++++ README.md | 14 ++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bd47598 --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/README.md b/README.md index c47a532..87f6577 100644 --- a/README.md +++ b/README.md @@ -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!