From 21eb6cffef5d585ea619bf383b8bd8cbfb24bfa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Hell?= Date: Wed, 30 Sep 2026 13:56:08 +0200 Subject: [PATCH] Fix static assets 404 in Docker image The final image copies assets to /server/assets but the binary sits at image root (/mlm), so resolve_assets_dir()'s exe-relative fallback looks in /assets, and the compile-time CARGO_MANIFEST_DIR fallback points at a build-stage-only path. Neither exists at runtime, so ServeDir has no root and every /assets/* request 404s. Set MLM_ASSETS_DIR explicitly to the path assets are actually copied to. Co-Authored-By: Claude Sonnet 5 --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 71bbc8cd..2aa9e93b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,4 +52,5 @@ COPY --from=build /app/target/release/mlm /mlm ENV MLM_LOG_DIR="" ENV MLM_CONFIG_FILE="/config/config.toml" ENV MLM_DB_FILE="/data/data.db" +ENV MLM_ASSETS_DIR="/server/assets" CMD ["/mlm"]