From 00a1258458fde5c17874a757673f3489e9d93788 Mon Sep 17 00:00:00 2001 From: Dorian Date: Wed, 6 May 2026 16:54:27 +0100 Subject: [PATCH] fix(docker): make Portainer repository deploy buildable --- apps/api/src/server.ts | 3 +++ docker-compose.yml | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/api/src/server.ts b/apps/api/src/server.ts index 9564df9..e4bd98b 100644 --- a/apps/api/src/server.ts +++ b/apps/api/src/server.ts @@ -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); diff --git a/docker-compose.yml b/docker-compose.yml index 4fa1ebc..f64049c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,12 +7,14 @@ version: "3.9" services: gashboard: # Portainer "Stacks → Repository" will build this from the gashboard git repo. - # If you want to pull a pre-built image instead, comment out `build:` and - # set `image:` to your registry tag. + # Do not set `image: gashboard:...` here: Portainer will try to pull that + # local-only name from Docker Hub before building and deployment will fail. + # If you want to pull a pre-built image instead, replace `build:` with an + # `image:` value that includes your registry, for example: + # image: ghcr.io/your-user/gashboard:0.1.0 build: context: . dockerfile: Dockerfile - image: gashboard:0.1.0 container_name: gashboard restart: unless-stopped environment: