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