fix(docker): make Portainer repository deploy buildable

This commit is contained in:
Dorian
2026-05-06 16:54:27 +01:00
parent b15c24f1f2
commit 00a1258458
2 changed files with 8 additions and 3 deletions

View File

@@ -53,12 +53,15 @@ export function buildApp() {
: resolveDefaultStaticDir();
if (staticDir && fs.existsSync(staticDir)) {
logger.info({ staticDir }, "serving web assets");
app.use(express.static(staticDir, { index: false, maxAge: "1h" }));
app.get(/.*/, (_req, res, next) => {
const indexFile = path.join(staticDir, "index.html");
if (!fs.existsSync(indexFile)) return next();
res.sendFile(indexFile);
});
} else {
logger.warn({ staticDir }, "web assets directory not found");
}
app.use(errorHandler);