Add backend data aggregator and API proxy services

- update-data.js: cron job that aggregates Google Calendar ICS feeds
  (today + upcoming, node-ical), Netbird reachability, Gitea/GitLab
  commit stats and Open WebUI models into data.json
- server.js: small Node proxy behind nginx exposing /api/chat
  (Open WebUI completions), /api/gpu-stats and /api/ollama
- gitlab-relay.js: prepared HTTP relay for GitLab over a Netbird VPN
  (not wired up yet; the setup key was rejected by vpn.ixsol.at)
- docker-entrypoint.sh: starts updater in the background, API proxy,
  cron (15 min refresh) and nginx without blocking startup
- nginx: proxy locations + no-cache for data.json
- compose: TZ, token env wiring from .env, gpu-stats service
  (python + rocm-smi with device passthrough)
- dockerignore: keep .env out of the build context
This commit is contained in:
2026-09-04 14:07:01 +02:00
parent 9c3eba55db
commit 55e871bd4f
10 changed files with 749 additions and 6 deletions
+31 -1
View File
@@ -1,5 +1,5 @@
# Custom nginx config (used by the Dockerfile).
# Serves the static dashboard with sensible caching + security headers.
# Serves the static dashboard and proxies /api/chat to the Node API backend.
server {
listen 80;
@@ -8,6 +8,36 @@ server {
root /usr/share/nginx/html;
index index.html;
# Generated data feed; refresh frequently.
location = /data.json {
add_header Cache-Control "no-cache" always;
}
# Open WebUI chat proxy.
location /api/chat {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_read_timeout 120s;
}
# GPU stats proxy (forwarded through the Node backend).
location /api/gpu-stats {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_read_timeout 15s;
}
# Ollama loaded-model stats proxy.
location /api/ollama {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_read_timeout 15s;
}
location / {
try_files $uri $uri/ =404;
}