From bd0f2e01716bafce2275f3722226d117ec07492b Mon Sep 17 00:00:00 2001 From: ramvignesh-b Date: Mon, 20 Apr 2026 20:59:09 +0530 Subject: [PATCH] fix: update e2e script to include e2e env source --- backend/config/settings.py | 2 +- scripts/run-e2e.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/config/settings.py b/backend/config/settings.py index e3b46d2..93481a7 100644 --- a/backend/config/settings.py +++ b/backend/config/settings.py @@ -21,7 +21,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent # Load dotenv files env = environ.Env() -env_file = os.path.join(BASE_DIR.parent, ".env") +env_file = os.environ.get("PIKU_ENV_FILE", os.path.join(BASE_DIR.parent, ".env")) if os.path.exists(env_file): environ.Env.read_env(env_file, overwrite=False) diff --git a/scripts/run-e2e.sh b/scripts/run-e2e.sh index c0e7951..5cfc820 100755 --- a/scripts/run-e2e.sh +++ b/scripts/run-e2e.sh @@ -35,6 +35,7 @@ cleanup() { trap cleanup EXIT echo "Starting Database and Mail server..." + COMPOSE_BIN="$(command -v docker-compose || true)" if echo "$CONTAINER_BIN" | grep -q "podman"; then @@ -51,6 +52,7 @@ until $CONTAINER_BIN exec "$DB_NAME" pg_isready -U "${DB_USER:-test}" >/dev/null sleep 2 done +export PIKU_ENV_FILE="$ENV_FILE" echo "Starting Backend..." mkdir -p ./tmp/logs (cd backend && uv run manage.py migrate)