diff --git a/Brain.md b/Brain.md index ffe4633..b5d94b1 100644 --- a/Brain.md +++ b/Brain.md @@ -143,3 +143,25 @@ mischlabs/ - Statusdiagnose nutzt Browser-Fetch mit `mode: "no-cors"`. Dadurch erkennt sie Erreichbarkeit/Timeouts, aber bei fremden Subdomains keine echten HTTP-Statuscodes. - Wenn der Browser die Pruefung wegen CORS/CORB blockiert (`Failed to fetch`), wird der Dienst **nicht** mehr als offline markiert, sondern als "Nicht im Browser pruefbar". Das betraf z. B. Vaultwarden/`password.mischlabs.de`. - Fuer echte Fehlerdetails braucht es ein kleines Backend bzw. einen Statusproxy, der serverseitig `HEAD`/`GET` prueft. + +## Statusproxy Stand 2026-05-21 +- `mischlabs` wurde von Nginx auf einen kleinen Node-Server (`server.js`) umgestellt. +- Der Node-Server serviert die statischen Dateien weiter und stellt `/api/status` bereit. +- `/api/status` liefert: + - Docker-Container via `/var/run/docker.sock` + - Watchtower-Logs und letzten Watchtower-Lauf + - Speicherplatz fuer `/volume1` und `/volume2`, im Container gemountet als `/host/volume1` und `/host/volume2` + - Serverseitige Service-Checks mit HTTP-Status und Latenz +- NAS-Compose fuer `mischlabs` braucht diese Mounts: + +```yaml +volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /volume1:/host/volume1:ro + - /volume2:/host/volume2:ro +``` + +- Aktuelle NAS-Werte bei Planung: + - `/volume1`: 3.7T total, 2.5T used, 1.2T free, 68% + - `/volume2`: 104G total, 88G used, 12G free, 89% + - Watchtower: `Scanned=23`, `Updated=0`, `Failed=0` beim manuellen Lauf um 2026-05-21 14:16 UTC diff --git a/Dockerfile b/Dockerfile index 0c9f555..2abfaf7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,22 @@ -FROM nginx:alpine +FROM node:22-alpine -COPY nginx.conf /etc/nginx/conf.d/default.conf -COPY index.html /usr/share/nginx/html/ -COPY admin.html /usr/share/nginx/html/ -COPY offline.html /usr/share/nginx/html/ -COPY style.css /usr/share/nginx/html/ -COPY app.js /usr/share/nginx/html/ -COPY admin.js /usr/share/nginx/html/ -COPY services.json /usr/share/nginx/html/ -COPY manifest.webmanifest /usr/share/nginx/html/ -COPY sw.js /usr/share/nginx/html/ -COPY icons/ /usr/share/nginx/html/icons/ +WORKDIR /app + +COPY server.js /app/server.js +COPY index.html /app/public/ +COPY admin.html /app/public/ +COPY offline.html /app/public/ +COPY style.css /app/public/ +COPY app.js /app/public/ +COPY admin.js /app/public/ +COPY services.json /app/public/ +COPY manifest.webmanifest /app/public/ +COPY sw.js /app/public/ +COPY icons/ /app/public/icons/ + +ENV NODE_ENV=production +ENV PORT=80 EXPOSE 80 + +CMD ["node", "server.js"] diff --git a/admin.html b/admin.html index 2a3f1c5..bfba291 100644 --- a/admin.html +++ b/admin.html @@ -6,7 +6,7 @@