From 9b180b364b37085eeede71c9f6395eac19ae410b Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 11 Feb 2026 14:01:18 +0000 Subject: [PATCH] Add PYTHONPATH=/app so Hypercorn spawn workers find app module Hypercorn spawns worker processes via multiprocessing spawn, which starts a fresh Python interpreter without the parent's sys.path modifications from path_setup.py. Setting PYTHONPATH=/app ensures the worker can import app.py and all project packages. Co-Authored-By: Claude Opus 4.6 --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 321a9f5..08ee59e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,7 @@ FROM python:3.11-slim AS base ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ + PYTHONPATH=/app \ PIP_NO_CACHE_DIR=1 \ APP_PORT=8000 \ APP_MODULE=app:app