From 7b164fadff38963a7534f6063058fe15e86f7013 Mon Sep 17 00:00:00 2001 From: Matias Bertani Date: Tue, 29 Aug 2023 18:34:29 -0300 Subject: [PATCH] chore: project: add Dockerfile --- Dockerfile | 12 ++++++++++++ README.md | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8d51843 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.11-slim + +COPY Pipfile Pipfile.lock ./ + +RUN pip install --no-cache-dir pipenv && \ + pipenv install --dev --system --ignore-pipfile + +COPY . . + +EXPOSE 8000 + +CMD ["pipenv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/README.md b/README.md index 1452707..4b1e4b3 100644 --- a/README.md +++ b/README.md @@ -1 +1,10 @@ # gamification_api + +### Run the app + +#### With docker + +```bash +docker build -t gamification_api . +docker run -p 8000:8000 gamification_api +```