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 +```