From df2f4b2e2acdedb07106f20b8e428e03ffed57b4 Mon Sep 17 00:00:00 2001 From: pnannery Date: Tue, 21 Apr 2026 10:35:22 -0400 Subject: [PATCH] Fix docs path resolution in container --- web/src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/index.js b/web/src/index.js index 95123cc..9bd3cbd 100644 --- a/web/src/index.js +++ b/web/src/index.js @@ -44,7 +44,9 @@ const BASE_URL = process.env.BASE_URL || `http://localhost:${PORT}`; const isProd = process.env.NODE_ENV === 'production'; const trustProxy = process.env.TRUST_PROXY === '1' || process.env.TRUST_PROXY === 'true'; const isMemoryDb = !process.env.DATABASE_URL || process.env.DATABASE_URL.startsWith('memory://'); -const appRoot = process.env.APP_ROOT || fileURLToPath(new URL('../../', import.meta.url)); +// appRoot should resolve to the repo root inside the container (typically /app) +// index.js lives at /app/src/index.js, so ../ is the correct root. +const appRoot = process.env.APP_ROOT || fileURLToPath(new URL('../', import.meta.url)); const dataRoot = process.env.DATA_DIR || path.join(appRoot, 'data'); if (trustProxy) app.set('trust proxy', 1);