From 7340faa94abf4dd2d003700899ae7e9f16d8831c Mon Sep 17 00:00:00 2001 From: Jonas Bengtsson Date: Wed, 19 Aug 2026 21:42:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 3 ++- app/main.py | 2 +- stack.env | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3d54b24..6dddddd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,8 @@ FROM python:3.12-slim ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ - CONFIG_PATH=/app/config/config.json + CONFIG_PATH=/app/config/config.json \ + ROOT_PATH="" WORKDIR /app diff --git a/app/main.py b/app/main.py index 0c6cf5a..b26a1f0 100644 --- a/app/main.py +++ b/app/main.py @@ -67,7 +67,7 @@ class AppConfig(BaseModel): return self -app = FastAPI(title="Bo hemma-avi") +app = FastAPI(root_path=os.getenv("ROOT_PATH", ""), title="Bo hemma-avi") app.mount("/static", StaticFiles(directory="app/static"), name="static") templates = Jinja2Templates(directory="app/templates") diff --git a/stack.env b/stack.env index d05144a..95fbcc7 100644 --- a/stack.env +++ b/stack.env @@ -1 +1,2 @@ -CONFIG_FILE=/app/config/config.json \ No newline at end of file +CONFIG_FILE=/app/config/config.json +ROOT_PATH="/bo-hemma-freja" \ No newline at end of file