From fa05870cbcf506dd07ecec15bb4f7d72865b5e95 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Mon, 16 Oct 2023 23:06:19 +0200 Subject: [PATCH] add dockerfile --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c3cd200 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11-slim AS backend-builder +WORKDIR /app + +COPY requierements.txt /app/ + + +RUN pip install --upgrade pip +RUN pip install -r requierements.txt + +# Create the final image +FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11-slim + +WORKDIR /app + +COPY --from=backend-builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages +COPY app /app/app + + +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] \ No newline at end of file