From 2fce25b07e4e36e5b4af5a8cd23826252f67ecb0 Mon Sep 17 00:00:00 2001 From: Martin Stickelbroeck Date: Mon, 12 Oct 2026 10:16:35 +0200 Subject: [PATCH] feat: Support col.stickelbroeck.com (Spieleseite) & col-admin.stickelbroeck.com (Schaltzentrale) --- docker-compose.yml | 10 ++++++++++ public/dashboard.html | 4 ++-- public/index.html | 5 +++++ server.js | 9 ++++++++- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 987ae52..0b266d2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,3 +17,13 @@ services: interval: 30s timeout: 5s retries: 3 + networks: + - default + - forgejo-net + +networks: + default: + forgejo-net: + external: true + name: forgejo_forgejo-net + diff --git a/public/dashboard.html b/public/dashboard.html index 24c021a..2d82ea6 100644 --- a/public/dashboard.html +++ b/public/dashboard.html @@ -336,8 +336,8 @@ Live · 20.0 Hz Loop - - Zur Website + + Zur Spieleseite diff --git a/public/index.html b/public/index.html index 6415f4f..dd08c1b 100644 --- a/public/index.html +++ b/public/index.html @@ -58,6 +58,11 @@ Atmosphäre + + + Schaltzentrale + + Spielen diff --git a/server.js b/server.js index 34f8231..77ed0c4 100644 --- a/server.js +++ b/server.js @@ -151,9 +151,16 @@ const server = http.createServer((req, res) => { // ------------------------------------------------------------------------ // Static Page Routes // ------------------------------------------------------------------------ + const host = (req.headers.host || '').toLowerCase(); + const isAdminDomain = host.startsWith('col-admin'); + let filePath = ''; if (pathname === '/' || pathname === '/index.html') { - filePath = path.join(PUBLIC_DIR, 'index.html'); + if (isAdminDomain) { + filePath = path.join(PUBLIC_DIR, 'dashboard.html'); + } else { + filePath = path.join(PUBLIC_DIR, 'index.html'); + } } else if (pathname === '/dashboard' || pathname === '/dashboard.html') { filePath = path.join(PUBLIC_DIR, 'dashboard.html'); } else {