Replaces the per-scene HTML directories (landing/, loading/, game/,
desktop/, goodbye/, music-box/, music/) with a single Laravel app
serving every overlay over HTTP. Supervisord runs `php artisan serve`
on 127.0.0.1:1118 and the OBS scene JSON now references HTTP routes
instead of file:// URLs.
Highlights:
- public/css/hud.css consolidates the duplicated HUD chrome,
scanlines/vignette/flicker, terminal styling, and pulse keyframes
that were copy-pasted across all seven scenes.
- Blade partials own hud-strip, crt-overlays, obs-ws-scripts,
camera-frame, screen-frame; the seven scenes extend a shared
overlay layout.
- Artisan commands (`rig:setup`, `rig:telemetry`, `rig:loading`,
`rig:playlist`, `rig:cmd`) replace the shell scripts that wrote
per-rig JSON snapshots. TwitchHelix + HardwareSnapshot services
handle the work the bash + Python helpers used to.
- ObsWsClient + MusicCommandController kill the 250 ms cmd.js poll
in the music daemon: POST /cmd/{skip|prev|pause|resume} opens a
short-lived Pawl WS, authenticates, and broadcasts mpd:cmd.
- AudioController streams files from the configured music dirs so
CEF can load tracks under the HTTP origin (Chromium blocks
HTTP-origin pages from loading file:// media).
- DataController serves /data/playlist.js (with ETag mtime cache)
and /cover.jpg (no-store) so the existing overlays' window.__PLAYLIST
and cover.jpg cache-bust pattern keeps working.
scripts/obs-webapp.supervisord.conf is the supervisord unit; install
to /etc/supervisor.d/obs-webapp.conf.
scripts/rewrite-scene-urls.py is a one-shot tool that rewrites
basic/scenes/Default_Stream_HUD.json from file:// to HTTP URLs.
basic/scenes/Default_Stream_HUD.json.pre-webapp is the rollback
artifact (made with OBS closed; full pre-migration state).
The seven old scene directories, vendor/, and the bash scripts are
still on disk pending visual verification; the next commit will
prune them.
185 lines
6.7 KiB
PHP
185 lines
6.7 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Str;
|
|
use Pdo\Mysql;
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Default Database Connection Name
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here you may specify which of the database connections below you wish
|
|
| to use as your default connection for database operations. This is
|
|
| the connection which will be utilized unless another connection
|
|
| is explicitly specified when you execute a query / statement.
|
|
|
|
|
*/
|
|
|
|
'default' => env('DB_CONNECTION', 'sqlite'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Database Connections
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Below are all of the database connections defined for your application.
|
|
| An example configuration is provided for each database system which
|
|
| is supported by Laravel. You're free to add / remove connections.
|
|
|
|
|
*/
|
|
|
|
'connections' => [
|
|
|
|
'sqlite' => [
|
|
'driver' => 'sqlite',
|
|
'url' => env('DB_URL'),
|
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
|
'prefix' => '',
|
|
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
|
'busy_timeout' => null,
|
|
'journal_mode' => null,
|
|
'synchronous' => null,
|
|
'transaction_mode' => 'DEFERRED',
|
|
],
|
|
|
|
'mysql' => [
|
|
'driver' => 'mysql',
|
|
'url' => env('DB_URL'),
|
|
'host' => env('DB_HOST', '127.0.0.1'),
|
|
'port' => env('DB_PORT', '3306'),
|
|
'database' => env('DB_DATABASE', 'laravel'),
|
|
'username' => env('DB_USERNAME', 'root'),
|
|
'password' => env('DB_PASSWORD', ''),
|
|
'unix_socket' => env('DB_SOCKET', ''),
|
|
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
|
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
|
'prefix' => '',
|
|
'prefix_indexes' => true,
|
|
'strict' => true,
|
|
'engine' => null,
|
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
|
Mysql::ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
|
]) : [],
|
|
],
|
|
|
|
'mariadb' => [
|
|
'driver' => 'mariadb',
|
|
'url' => env('DB_URL'),
|
|
'host' => env('DB_HOST', '127.0.0.1'),
|
|
'port' => env('DB_PORT', '3306'),
|
|
'database' => env('DB_DATABASE', 'laravel'),
|
|
'username' => env('DB_USERNAME', 'root'),
|
|
'password' => env('DB_PASSWORD', ''),
|
|
'unix_socket' => env('DB_SOCKET', ''),
|
|
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
|
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
|
'prefix' => '',
|
|
'prefix_indexes' => true,
|
|
'strict' => true,
|
|
'engine' => null,
|
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
|
Mysql::ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
|
]) : [],
|
|
],
|
|
|
|
'pgsql' => [
|
|
'driver' => 'pgsql',
|
|
'url' => env('DB_URL'),
|
|
'host' => env('DB_HOST', '127.0.0.1'),
|
|
'port' => env('DB_PORT', '5432'),
|
|
'database' => env('DB_DATABASE', 'laravel'),
|
|
'username' => env('DB_USERNAME', 'root'),
|
|
'password' => env('DB_PASSWORD', ''),
|
|
'charset' => env('DB_CHARSET', 'utf8'),
|
|
'prefix' => '',
|
|
'prefix_indexes' => true,
|
|
'search_path' => 'public',
|
|
'sslmode' => env('DB_SSLMODE', 'prefer'),
|
|
],
|
|
|
|
'sqlsrv' => [
|
|
'driver' => 'sqlsrv',
|
|
'url' => env('DB_URL'),
|
|
'host' => env('DB_HOST', 'localhost'),
|
|
'port' => env('DB_PORT', '1433'),
|
|
'database' => env('DB_DATABASE', 'laravel'),
|
|
'username' => env('DB_USERNAME', 'root'),
|
|
'password' => env('DB_PASSWORD', ''),
|
|
'charset' => env('DB_CHARSET', 'utf8'),
|
|
'prefix' => '',
|
|
'prefix_indexes' => true,
|
|
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
|
|
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
|
|
],
|
|
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Migration Repository Table
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This table keeps track of all the migrations that have already run for
|
|
| your application. Using this information, we can determine which of
|
|
| the migrations on disk haven't actually been run on the database.
|
|
|
|
|
*/
|
|
|
|
'migrations' => [
|
|
'table' => 'migrations',
|
|
'update_date_on_publish' => true,
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Redis Databases
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Redis is an open source, fast, and advanced key-value store that also
|
|
| provides a richer body of commands than a typical key-value system
|
|
| such as Memcached. You may define your connection settings here.
|
|
|
|
|
*/
|
|
|
|
'redis' => [
|
|
|
|
'client' => env('REDIS_CLIENT', 'phpredis'),
|
|
|
|
'options' => [
|
|
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
|
'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-database-'),
|
|
'persistent' => env('REDIS_PERSISTENT', false),
|
|
],
|
|
|
|
'default' => [
|
|
'url' => env('REDIS_URL'),
|
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
|
'username' => env('REDIS_USERNAME'),
|
|
'password' => env('REDIS_PASSWORD'),
|
|
'port' => env('REDIS_PORT', '6379'),
|
|
'database' => env('REDIS_DB', '0'),
|
|
'max_retries' => env('REDIS_MAX_RETRIES', 3),
|
|
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
|
|
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
|
|
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
|
|
],
|
|
|
|
'cache' => [
|
|
'url' => env('REDIS_URL'),
|
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
|
'username' => env('REDIS_USERNAME'),
|
|
'password' => env('REDIS_PASSWORD'),
|
|
'port' => env('REDIS_PORT', '6379'),
|
|
'database' => env('REDIS_CACHE_DB', '1'),
|
|
'max_retries' => env('REDIS_MAX_RETRIES', 3),
|
|
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
|
|
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
|
|
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
|
|
],
|
|
|
|
],
|
|
|
|
];
|