From b95e86120fc00c4cf7c5a7a6484af8c8d3267682 Mon Sep 17 00:00:00 2001 From: prabinoid <38830224+prabinoid@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:37:30 +0545 Subject: [PATCH] Add PYTHONPATH and bind mount for migrations --- Dockerfile | 1 + docker-compose.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 74539ee476..9b3a7ede9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,6 +60,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PYTHONFAULTHANDLER=1 \ PATH="/home/appuser/.local/bin:$PATH" \ + PYTHONPATH="/usr/src/app:$PYTHONPATH" \ PYTHON_LIB="/home/appuser/.local/lib/python$PYTHON_IMG_TAG/site-packages" \ SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \ REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt diff --git a/docker-compose.yml b/docker-compose.yml index 89c2d175bf..e8f0c294f3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,6 +40,7 @@ services: - ./pyproject.toml:/usr/src/app/pyproject.toml:ro - ./backend:/usr/src/app/backend:ro - ./tests:/usr/src/app/tests:ro + - ./migrations:/src/migrations restart: unless-stopped healthcheck: test: curl --fail http://localhost:5000 || exit 1