From e4984b2d03fd72d8f807af876fddbecfb18eb12f Mon Sep 17 00:00:00 2001 From: KoalaDev <6156589+Shik3i@users.noreply.github.com> Date: Wed, 15 Jul 2026 04:37:51 +0200 Subject: [PATCH] fix(website): complete self-hosting example --- scripts/test-website-theme.mjs | 23 +++++++++++++++++++++++ website/template.html | 23 +++++++++++++++-------- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/scripts/test-website-theme.mjs b/scripts/test-website-theme.mjs index d7b278e..09e5b19 100644 --- a/scripts/test-website-theme.mjs +++ b/scripts/test-website-theme.mjs @@ -67,6 +67,28 @@ if (!llmsText.includes('wss://syncserver.koalastuff.net') || !llmsText.includes( throw new Error('llms.txt must distinguish the public TLS relay URL from the internal self-hosting port'); } +const selfHostingStart = template.indexOf('
', selfHostingStart); +if (selfHostingStart === -1 || selfHostingEnd === -1) { + throw new Error('Could not locate the self-hosting examples in website/template.html'); +} +const selfHostingExamples = template.slice(selfHostingStart, selfHostingEnd); +const requiredSelfHostingValues = [ + 'SERVER_SALT:', + 'REPLACE_WITH_OPENSSL_RAND_BASE64_32_OUTPUT', + 'ADMIN_METRICS_TOKEN:', + 'DEBUG_LOGGING:', + '127.0.0.1:3000:3000' +]; +for (const value of requiredSelfHostingValues) { + if (!selfHostingExamples.includes(value)) { + throw new Error(`Website self-hosting compose example is missing ${value}`); + } +} +if ((selfHostingExamples.match(/localhost:3000/g) || []).length !== 2 || selfHostingExamples.includes('KoalaSync:3000')) { + throw new Error('Both Caddy examples must match the compose loopback port binding'); +} + const landingStylesheet = landingStylesheets[0][0]; if (!/href="\{\{ASSET_PATH\}\}landing\.min\.css"/.test(landingStylesheet)) { throw new Error('Landing stylesheet must use the landing.min.css build placeholder'); @@ -145,6 +167,7 @@ if (!/animation:\s*none\s*!important/.test(reducedMotionRule)) { console.log('Extension mockup theme-sensitive text uses theme-aware colors'); console.log('Landing CSS is render-blocking, single-request, and cascade-stable'); console.log('Landing head discovers a complete and architecture-accurate llms.txt'); +console.log('Website self-hosting examples include production secrets and consistent networking'); console.log('Foreground film birds use complete, always-on wing and glide animations'); console.log('All Getting Started mockups define explicit light-theme surfaces'); console.log('Getting Started step numbers stay readable in light mode'); diff --git a/website/template.html b/website/template.html index 6d672cd..38ce4ec 100644 --- a/website/template.html +++ b/website/template.html @@ -1374,14 +1374,21 @@ koala-sync: image: ghcr.io/shik3i/koalasync:latest container_name: KoalaSync - restart: always - # Access internally by proxying to container port 3000 + restart: unless-stopped environment: - - TZ=Europe/Berlin - - PORT=3000 - - MIN_VERSION=1.0.0 - - MAX_ROOMS=100 - - MAX_PEERS_PER_ROOM=50 + TZ: Europe/Berlin + PORT: 3000 + MIN_VERSION: 1.0.0 + MAX_ROOMS: 100 + MAX_PEERS_PER_ROOM: 25 + # Required: replace before starting + SERVER_SALT: "REPLACE_WITH_OPENSSL_RAND_BASE64_32_OUTPUT" + # Optional: leave empty or replace with a 32+ character token + ADMIN_METRICS_TOKEN: "" + DEBUG_LOGGING: "0" + # Host Caddy reaches the relay only through this loopback binding + ports: + - "127.0.0.1:3000:3000" pids_limit: 2048
@@ -1449,7 +1456,7 @@ syncserver.koalastuff.net { import security_headers encode zstd gzip - reverse_proxy KoalaSync:3000 + reverse_proxy localhost:3000 }