From e75f23e3d9069cd4c61372d7c4894f8a55aad8f7 Mon Sep 17 00:00:00 2001 From: Jack Jackson Date: Mon, 24 Jun 2024 21:14:08 -0700 Subject: [PATCH] Add psycopg2 dependency for prod --- Dockerfile | 6 ++++++ requirements-prod-only.txt | 1 + 2 files changed, 7 insertions(+) create mode 100644 requirements-prod-only.txt diff --git a/Dockerfile b/Dockerfile index 5069467..e303aaf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,6 +48,12 @@ EXPOSE 8000 FROM base AS prod +USER root +RUN --mount=type=cache,target=/root/.cache/pip \ + --mount=type=bind,source=requirements-prod-only.txt,target=requirements-prod-only.txt \ + python -m pip install -r requirements-prod-only.txt +USER appuser + COPY . . CMD uvicorn app:app --host 0.0.0.0 diff --git a/requirements-prod-only.txt b/requirements-prod-only.txt new file mode 100644 index 0000000..37ec460 --- /dev/null +++ b/requirements-prod-only.txt @@ -0,0 +1 @@ +psycopg2-binary