From 69da6a81639907c4b9dd8941ca8559c68535adea Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sat, 25 Mar 2023 21:12:55 +0100 Subject: [PATCH] Added dockerbuild and .dockerignore --- .dockerignore | 4 ++++ Dockerfile | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..cbffbcf --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +__pycache__ +upload +venv +.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a648eb9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.10-alpine + +WORKDIR /usr/src/app + +COPY requirements.txt ./ + +RUN apk add --no-cache --update libmagic \ + && pip install --no-cache-dir --upgrade pip \ + && pip install --no-cache-dir -r requirements.txt + +COPY . . + +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]