diff --git a/Dockerfile b/Dockerfile index 14d4369447..1d8d98cd36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ # - Runs a non-root user. # - Sets up the entrypoint and port. -FROM python:3.11.1-slim-bullseye as base-image +FROM python:3.11.6-slim-bullseye as base-image # Update system packages COPY server/scripts/install-base-packages.sh . diff --git a/server/requirements.txt b/server/requirements.txt index f193b62170..6a4fe750a9 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -1 +1,2 @@ uvicorn +psycopg2 diff --git a/server/scripts/install-base-packages.sh b/server/scripts/install-base-packages.sh index 4048ad5b50..5a5cdfa771 100755 --- a/server/scripts/install-base-packages.sh +++ b/server/scripts/install-base-packages.sh @@ -56,8 +56,8 @@ apt-get update # Install security updates: apt-get -y upgrade -# Example of installing a new package, without unnecessary packages: -#apt-get -y install --no-install-recommends git +# libpq is required for psycopg2, the Python postgres bindings +apt-get -y install --no-install-recommends libpq5 # Delete cached files we don't need anymore: apt-get clean diff --git a/server/scripts/install-dependency-packages.sh b/server/scripts/install-dependency-packages.sh index 7a00218481..d83adb1a50 100755 --- a/server/scripts/install-dependency-packages.sh +++ b/server/scripts/install-dependency-packages.sh @@ -59,7 +59,8 @@ apt-get update # is sometimes needed to build cffi (a cryptography dependency). # Git is needed because we still have some Python dependencies pointing # directly at Git repos -apt-get -y install --no-install-recommends build-essential libffi-dev git +# Libpq-dev is needed to build psycopg2, the postgres bindings for python +apt-get -y install --no-install-recommends build-essential libffi-dev git libpq-dev # Delete cached files we don't need anymore: apt-get clean