mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-07-26 12:08:15 +00:00
fix(website): complete self-hosting example
This commit is contained in:
@@ -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('<div id="pane-docker"');
|
||||
const selfHostingEnd = template.indexOf('</section>', 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');
|
||||
|
||||
+15
-8
@@ -1374,14 +1374,21 @@
|
||||
<span class="t-key">koala-sync:</span>
|
||||
<span class="t-key">image:</span> <span class="t-str">ghcr.io/shik3i/koalasync:latest</span>
|
||||
<span class="t-key">container_name:</span> <span class="t-str">KoalaSync</span>
|
||||
<span class="t-key">restart:</span> <span class="t-str">always</span>
|
||||
<span class="t-comment"># Access internally by proxying to container port 3000</span>
|
||||
<span class="t-key">restart:</span> <span class="t-str">unless-stopped</span>
|
||||
<span class="t-key">environment:</span>
|
||||
<span class="t-key">-</span> <span class="t-str">TZ=Europe/Berlin</span>
|
||||
<span class="t-key">-</span> <span class="t-str">PORT=3000</span>
|
||||
<span class="t-key">-</span> <span class="t-str">MIN_VERSION=1.0.0</span>
|
||||
<span class="t-key">-</span> <span class="t-str">MAX_ROOMS=100</span>
|
||||
<span class="t-key">-</span> <span class="t-str">MAX_PEERS_PER_ROOM=50</span>
|
||||
<span class="t-key">TZ:</span> <span class="t-str">Europe/Berlin</span>
|
||||
<span class="t-key">PORT:</span> <span class="t-val">3000</span>
|
||||
<span class="t-key">MIN_VERSION:</span> <span class="t-str">1.0.0</span>
|
||||
<span class="t-key">MAX_ROOMS:</span> <span class="t-val">100</span>
|
||||
<span class="t-key">MAX_PEERS_PER_ROOM:</span> <span class="t-val">25</span>
|
||||
<span class="t-comment"># Required: replace before starting</span>
|
||||
<span class="t-key">SERVER_SALT:</span> <span class="t-str">"REPLACE_WITH_OPENSSL_RAND_BASE64_32_OUTPUT"</span>
|
||||
<span class="t-comment"># Optional: leave empty or replace with a 32+ character token</span>
|
||||
<span class="t-key">ADMIN_METRICS_TOKEN:</span> <span class="t-str">""</span>
|
||||
<span class="t-key">DEBUG_LOGGING:</span> <span class="t-str">"0"</span>
|
||||
<span class="t-comment"># Host Caddy reaches the relay only through this loopback binding</span>
|
||||
<span class="t-key">ports:</span>
|
||||
<span class="t-key">-</span> <span class="t-str">"127.0.0.1:3000:3000"</span>
|
||||
<span class="t-key">pids_limit:</span> <span class="t-val">2048</span></code></pre>
|
||||
<div style="margin-top: 1rem; font-size: 0.75rem; text-align: right; padding-right: 0.5rem;">
|
||||
<a href="https://github.com/Shik3i/KoalaSync/pkgs/container/koalasync" target="_blank" rel="noopener" style="color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; transition: opacity 0.2s; opacity: 0.85;">
|
||||
@@ -1449,7 +1456,7 @@
|
||||
<span class="t-key">syncserver.koalastuff.net</span> {
|
||||
<span class="t-key">import</span> <span class="t-val">security_headers</span>
|
||||
<span class="t-key">encode</span> <span class="t-val">zstd gzip</span>
|
||||
<span class="t-key">reverse_proxy</span> <span class="t-val">KoalaSync:3000</span>
|
||||
<span class="t-key">reverse_proxy</span> <span class="t-val">localhost:3000</span>
|
||||
}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user