Add a stage branch deploy beside production on z00.
CI / test (push) Failing after 23s
CI / build-and-push (push) Skipped
CI / deploy (push) Skipped
CI / deploy-stage (push) Skipped

Pushing stage runs CI and deploys to stage.transcribe.z00.nu with its own data, Reverb credentials, and Caddy network.
This commit is contained in:
ben
2026-08-13 18:19:47 +02:00
parent c6856c04d5
commit 5e76bfdec1
12 changed files with 388 additions and 32 deletions
+28 -5
View File
@@ -3,13 +3,36 @@ import Echo from 'laravel-echo';
import Pusher from 'pusher-js';
window.Pusher = Pusher;
function metaContent(name) {
return document.querySelector(`meta[name="${name}"]`)?.getAttribute('content')?.trim() || '';
}
const isLocalHost = ['localhost', '127.0.0.1'].includes(window.location.hostname);
const internalHosts = new Set(['', 'reverb', 'localhost', '127.0.0.1']);
const key = metaContent('reverb-key') || import.meta.env.VITE_REVERB_APP_KEY;
let host = metaContent('reverb-host') || import.meta.env.VITE_REVERB_HOST || '';
let port = metaContent('reverb-port') || import.meta.env.VITE_REVERB_PORT || '';
let scheme = metaContent('reverb-scheme') || import.meta.env.VITE_REVERB_SCHEME || 'https';
if (!isLocalHost && internalHosts.has(host)) {
host = `reverb.${window.location.hostname}`;
port = '443';
scheme = 'https';
} else if (isLocalHost && host === 'reverb') {
host = import.meta.env.VITE_REVERB_HOST || 'localhost';
port = import.meta.env.VITE_REVERB_PORT || '8081';
scheme = import.meta.env.VITE_REVERB_SCHEME || 'http';
}
window.Echo = new Echo({
broadcaster: 'reverb',
key: import.meta.env.VITE_REVERB_APP_KEY,
wsHost: import.meta.env.VITE_REVERB_HOST,
wsPort: import.meta.env.VITE_REVERB_PORT ?? 80,
wssPort: import.meta.env.VITE_REVERB_PORT ?? 443,
forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https',
key,
wsHost: host,
wsPort: port || 80,
wssPort: port || 443,
forceTLS: scheme === 'https',
enabledTransports: ['ws', 'wss'],
authEndpoint: '/broadcasting/auth',
auth: {
+4
View File
@@ -1,6 +1,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="reverb-key" content="{{ config('reverb.client.key') }}">
<meta name="reverb-host" content="{{ config('reverb.client.host') }}">
<meta name="reverb-port" content="{{ config('reverb.client.port') }}">
<meta name="reverb-scheme" content="{{ config('reverb.client.scheme') }}">
<title>
{{ filled($title ?? null) ? $title.' — '.config('app.name', 'AndyTranscribe') : config('app.name', 'AndyTranscribe') }}