From 6e14458f29bc6a41d87b5f59789ef0909d129345 Mon Sep 17 00:00:00 2001 From: yaso-meth Date: Wed, 24 Jul 2024 13:20:52 +0200 Subject: [PATCH] update fastapi to guvicorn and improve supertoken integration --- backend/Dockerfile | 32 +++++++++++++++-- backend/__init__.py | 53 +++++++++++++-------------- backend/main.py | 59 ++++++++++++++++++++----------- backend/requirements.txt | 2 +- backend/routers/docOffices.py | 11 +++--- backend/routers/patients.py | 19 +++++----- backend/routers/patients_files.py | 11 +++--- backend/routers/patients_notes.py | 13 +++---- backend/routers/users.py | 13 +++---- docker-compose.yml | 14 +++++--- 10 files changed, 142 insertions(+), 85 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 72c6fb7a..05489ec1 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,6 +1,32 @@ -FROM python:3.12-slim +FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11-slim AS builder WORKDIR /app -COPY ./requirements.txt ./ -RUN pip3 install --no-cache-dir -r requirements.txt \ No newline at end of file +COPY requirements.txt ./ +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install -r requirements.txt + +# COPY . ./app + +# FROM builder as dev-envs + +# RUN <