Wire admin studio SSR and search infrastructure

This commit is contained in:
2026-05-01 11:46:06 +02:00
parent 257b0dbef6
commit 18cea8b0f0
329 changed files with 197465 additions and 2741 deletions

View File

@@ -54,6 +54,16 @@ return [
'url' => env('APP_URL', 'http://localhost'),
// Internal nginx X-Accel-Redirect settings for artwork original files.
// Keep downloads on the normal PHP streaming path unless accel is explicitly
// enabled and mapped in nginx.
'download_accel_enabled' => (bool) env('DOWNLOAD_ACCEL_ENABLED', false),
// Set this to the nginx internal location prefix (e.g. /internal/originals)
// to have nginx serve download file bodies directly, bypassing FPM buffering.
// Leave empty (default) to fall back to PHP streaming via response()->download().
'download_accel_path' => env('DOWNLOAD_ACCEL_PATH', ''),
/*
|--------------------------------------------------------------------------
| Application Timezone

View File

@@ -2,6 +2,27 @@
use Illuminate\Support\Str;
$resolveRedisUrl = static function (?string $url, ?string $password): ?string {
$normalizedUrl = is_string($url) ? trim($url) : '';
if ($normalizedUrl === '') {
return null;
}
$normalizedPassword = is_string($password) ? trim($password) : '';
if ($normalizedPassword === '') {
return $normalizedUrl;
}
return preg_match('#^[a-z][a-z0-9+.-]*://[^@]+@#i', $normalizedUrl) === 1
? $normalizedUrl
: null;
};
$sharedRedisPassword = env('REDIS_PASSWORD');
$defaultRedisUrl = $resolveRedisUrl(env('REDIS_URL'), $sharedRedisPassword);
$cacheRedisUrl = $resolveRedisUrl(env('REDIS_CACHE_URL', env('REDIS_URL')), $sharedRedisPassword);
$sessionRedisUrl = $resolveRedisUrl(env('REDIS_SESSION_URL', env('REDIS_URL')), $sharedRedisPassword);
return [
/*
@@ -173,10 +194,10 @@ return [
],
'default' => [
'url' => env('REDIS_URL'),
'url' => $defaultRedisUrl,
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'password' => $sharedRedisPassword,
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
'max_retries' => env('REDIS_MAX_RETRIES', 3),
@@ -186,10 +207,10 @@ return [
],
'cache' => [
'url' => env('REDIS_URL'),
'url' => $cacheRedisUrl,
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'password' => $sharedRedisPassword,
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
'max_retries' => env('REDIS_MAX_RETRIES', 3),
@@ -198,6 +219,19 @@ return [
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
],
'sessions' => [
'url' => $sessionRedisUrl,
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => $sharedRedisPassword,
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_SESSION_DB', '2'),
'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),
],
],
];

View File

@@ -47,6 +47,14 @@ return [
'report' => false,
],
'sitemaps_public' => [
'driver' => 'local',
'root' => public_path(),
'visibility' => 'public',
'throw' => false,
'report' => false,
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),

View File

@@ -7,4 +7,8 @@ return [
// 'announcements' => '/images/forum/defaults/announcements.jpg',
],
],
'category_role_access' => [
'administrators-and-moderators-forum' => ['admin', 'manager'],
],
];

View File

@@ -201,7 +201,7 @@ return [
'defaults' => [
'supervisor-default' => [
'connection' => 'redis',
'queue' => ['default'],
'queue' => ['search', 'default'],
'balance' => 'auto',
'autoScalingStrategy' => 'time',
'maxProcesses' => 1,
@@ -230,12 +230,12 @@ return [
'environments' => [
'production' => [
'supervisor-default' => [
'maxProcesses' => 10,
'maxProcesses' => 5,
'balanceMaxShift' => 1,
'balanceCooldown' => 3,
],
'supervisor-messaging' => [
'maxProcesses' => 6,
'maxProcesses' => 3,
'balanceMaxShift' => 1,
'balanceCooldown' => 3,
],

67
config/inertia.php Normal file
View File

@@ -0,0 +1,67 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Server Side Rendering
|--------------------------------------------------------------------------
|
| These options configures if and how Inertia uses Server Side Rendering
| to pre-render the initial visits made to your application's pages.
|
| You can specify a custom SSR bundle path, or omit it to let Inertia
| try and automatically detect it for you.
|
| Do note that enabling these options will NOT automatically make SSR work,
| as a separate rendering service needs to be available. To learn more,
| please visit https://inertiajs.com/server-side-rendering
|
*/
'ssr' => [
'enabled' => true,
'url' => 'http://127.0.0.1:13714',
// 'bundle' => base_path('bootstrap/ssr/ssr.mjs'),
],
/*
|--------------------------------------------------------------------------
| Testing
|--------------------------------------------------------------------------
|
| The values described here are used to locate Inertia components on the
| filesystem. For instance, when using `assertInertia`, the assertion
| attempts to locate the component as a file relative to any of the
| paths AND with any of the extensions specified here.
|
*/
'testing' => [
'ensure_pages_exist' => true,
'page_paths' => [
resource_path('js/Pages'),
],
'page_extensions' => [
'js',
'jsx',
'svelte',
'ts',
'tsx',
'vue',
],
],
];

View File

@@ -1,5 +1,24 @@
<?php
$resolveRedisUrl = static function (?string $url, ?string $password): ?string {
$normalizedUrl = is_string($url) ? trim($url) : '';
if ($normalizedUrl === '') {
return null;
}
$normalizedPassword = is_string($password) ? trim($password) : '';
if ($normalizedPassword === '') {
return $normalizedUrl;
}
return preg_match('#^[a-z][a-z0-9+.-]*://[^@]+@#i', $normalizedUrl) === 1
? $normalizedUrl
: null;
};
$sharedRedisPassword = env('REDIS_PASSWORD');
$reverbRedisUrl = $resolveRedisUrl(env('REVERB_REDIS_URL', env('REDIS_URL')), $sharedRedisPassword);
return [
/*
@@ -41,11 +60,11 @@ return [
'enabled' => env('REVERB_SCALING_ENABLED', false),
'channel' => env('REVERB_SCALING_CHANNEL', 'reverb'),
'server' => [
'url' => env('REDIS_URL'),
'url' => $reverbRedisUrl,
'host' => env('REDIS_HOST', '127.0.0.1'),
'port' => env('REDIS_PORT', '6379'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'password' => $sharedRedisPassword,
'database' => env('REDIS_DB', '0'),
'timeout' => env('REDIS_TIMEOUT', 60),
],

View File

@@ -95,7 +95,9 @@ return [
'id',
'tags',
'category',
'categories',
'content_type',
'content_types',
'published_as_type',
'orientation',
'resolution',

144
config/sentry.php Normal file
View File

@@ -0,0 +1,144 @@
<?php
/**
* Sentry Laravel SDK configuration file.
*
* @see https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/
*/
return [
// @see https://docs.sentry.io/concepts/key-terms/dsn-explainer/
'dsn' => env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')),
// @see https://spotlightjs.com/
// 'spotlight' => env('SENTRY_SPOTLIGHT', false),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#logger
// 'logger' => Sentry\Logger\DebugFileLogger::class, // By default this will log to `storage_path('logs/sentry.log')`
// The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
'release' => env('SENTRY_RELEASE'),
// When left empty or `null` the Laravel environment will be used (usually discovered from `APP_ENV` in your `.env`)
'environment' => env('SENTRY_ENVIRONMENT'),
// Override the organization ID used for trace continuation checks.
'org_id' => env('SENTRY_ORG_ID') === null ? null : (int) env('SENTRY_ORG_ID'),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#sample_rate
'sample_rate' => env('SENTRY_SAMPLE_RATE') === null ? 1.0 : (float) env('SENTRY_SAMPLE_RATE'),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#traces_sample_rate
'traces_sample_rate' => env('SENTRY_TRACES_SAMPLE_RATE') === null ? null : (float) env('SENTRY_TRACES_SAMPLE_RATE'),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#profiles_sample_rate
'profiles_sample_rate' => env('SENTRY_PROFILES_SAMPLE_RATE') === null ? null : (float) env('SENTRY_PROFILES_SAMPLE_RATE'),
// Only continue incoming traces when the organization IDs are compatible with this SDK instance.
'strict_trace_continuation' => env('SENTRY_STRICT_TRACE_CONTINUATION', false),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#enable_logs
'enable_logs' => env('SENTRY_ENABLE_LOGS', false),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#log_flush_threshold
'log_flush_threshold' => env('SENTRY_LOG_FLUSH_THRESHOLD') === null ? null : (int) env('SENTRY_LOG_FLUSH_THRESHOLD'),
// The minimum log level that will be sent to Sentry as logs using the `sentry_logs` logging channel
'logs_channel_level' => env('SENTRY_LOG_LEVEL', env('SENTRY_LOGS_LEVEL', env('LOG_LEVEL', 'debug'))),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#send_default_pii
'send_default_pii' => env('SENTRY_SEND_DEFAULT_PII', false),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#ignore_exceptions
// 'ignore_exceptions' => [],
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#ignore_transactions
'ignore_transactions' => [
// Ignore Laravel's default health URL
'/up',
],
// Breadcrumb specific configuration
'breadcrumbs' => [
// Capture Laravel logs as breadcrumbs
'logs' => env('SENTRY_BREADCRUMBS_LOGS_ENABLED', true),
// Capture Laravel cache events (hits, writes etc.) as breadcrumbs
'cache' => env('SENTRY_BREADCRUMBS_CACHE_ENABLED', true),
// Capture Livewire components like routes as breadcrumbs
'livewire' => env('SENTRY_BREADCRUMBS_LIVEWIRE_ENABLED', true),
// Capture SQL queries as breadcrumbs
'sql_queries' => env('SENTRY_BREADCRUMBS_SQL_QUERIES_ENABLED', true),
// Capture SQL query bindings (parameters) in SQL query breadcrumbs
'sql_bindings' => env('SENTRY_BREADCRUMBS_SQL_BINDINGS_ENABLED', false),
// Capture queue job information as breadcrumbs
'queue_info' => env('SENTRY_BREADCRUMBS_QUEUE_INFO_ENABLED', true),
// Capture command information as breadcrumbs
'command_info' => env('SENTRY_BREADCRUMBS_COMMAND_JOBS_ENABLED', true),
// Capture HTTP client request information as breadcrumbs
'http_client_requests' => env('SENTRY_BREADCRUMBS_HTTP_CLIENT_REQUESTS_ENABLED', true),
// Capture send notifications as breadcrumbs
'notifications' => env('SENTRY_BREADCRUMBS_NOTIFICATIONS_ENABLED', true),
],
// Performance monitoring specific configuration
'tracing' => [
// Trace queue jobs as their own transactions (this enables tracing for queue jobs)
'queue_job_transactions' => env('SENTRY_TRACE_QUEUE_ENABLED', true),
// Capture queue jobs as spans when executed on the sync driver
'queue_jobs' => env('SENTRY_TRACE_QUEUE_JOBS_ENABLED', true),
// Capture SQL queries as spans
'sql_queries' => env('SENTRY_TRACE_SQL_QUERIES_ENABLED', true),
// Capture SQL query bindings (parameters) in SQL query spans
'sql_bindings' => env('SENTRY_TRACE_SQL_BINDINGS_ENABLED', false),
// Capture where the SQL query originated from on the SQL query spans
'sql_origin' => env('SENTRY_TRACE_SQL_ORIGIN_ENABLED', true),
// Define a threshold in milliseconds for SQL queries to resolve their origin
'sql_origin_threshold_ms' => env('SENTRY_TRACE_SQL_ORIGIN_THRESHOLD_MS', 100),
// Capture views rendered as spans
'views' => env('SENTRY_TRACE_VIEWS_ENABLED', true),
// Capture Livewire components as spans
'livewire' => env('SENTRY_TRACE_LIVEWIRE_ENABLED', true),
// Capture HTTP client requests as spans
'http_client_requests' => env('SENTRY_TRACE_HTTP_CLIENT_REQUESTS_ENABLED', true),
// Capture Laravel cache events (hits, writes etc.) as spans
'cache' => env('SENTRY_TRACE_CACHE_ENABLED', true),
// Capture Redis operations as spans (this enables Redis events in Laravel)
'redis_commands' => env('SENTRY_TRACE_REDIS_COMMANDS', false),
// Capture where the Redis command originated from on the Redis command spans
'redis_origin' => env('SENTRY_TRACE_REDIS_ORIGIN_ENABLED', true),
// Capture send notifications as spans
'notifications' => env('SENTRY_TRACE_NOTIFICATIONS_ENABLED', true),
// Enable tracing for requests without a matching route (404's)
'missing_routes' => env('SENTRY_TRACE_MISSING_ROUTES_ENABLED', false),
// Configures if the performance trace should continue after the response has been sent to the user until the application terminates
// This is required to capture any spans that are created after the response has been sent like queue jobs dispatched using `dispatch(...)->afterResponse()` for example
'continue_after_response' => env('SENTRY_TRACE_CONTINUE_AFTER_RESPONSE', true),
// Enable the tracing integrations supplied by Sentry (recommended)
'default_integrations' => env('SENTRY_TRACE_DEFAULT_INTEGRATIONS_ENABLED', true),
],
];

View File

@@ -19,6 +19,11 @@ return [
'path' => trim((string) env('SITEMAPS_PREGENERATED_PATH', 'generated-sitemaps'), '/'),
],
'static_publish' => [
'enabled' => (bool) env('SITEMAPS_STATIC_PUBLISH_ENABLED', true),
'disk' => env('SITEMAPS_STATIC_PUBLISH_DISK', 'sitemaps_public'),
],
'releases' => [
'disk' => env('SITEMAPS_RELEASES_DISK', 'local'),
'path' => trim((string) env('SITEMAPS_RELEASES_PATH', 'sitemaps'), '/'),

15
config/toolbar.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Toolbar cache
|--------------------------------------------------------------------------
|
| Controls caching behaviour for the per-user toolbar counters. Value is
| the TTL in seconds. Use the environment variable
| TOOLBAR_CACHE_TTL_SECONDS to override in each environment.
|
*/
'cache_ttl_seconds' => env('TOOLBAR_CACHE_TTL_SECONDS', 30),
];

View File

@@ -7,6 +7,8 @@ return [
'local_originals_root' => env('ARTWORKS_LOCAL_ORIGINALS_ROOT', storage_path('app/originals/artworks')),
'readonly_backup_originals_root' => env('ARTWORKS_READONLY_BACKUP_ORIGINALS_ROOT', '/opt/www/virtual/files/cdn/artworks/original'),
'object_storage' => [
'disk' => env('ARTWORKS_OBJECT_DISK', 's3'),
'prefix' => env('ARTWORKS_OBJECT_PREFIX', 'artworks'),

36
config/view.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most template systems load templates from disk. Here you may specify
| an array of paths that should be checked for your views. Of course,
| the usual Laravel view path has already been registered for you.
|
*/
'paths' => [
resource_path('views'),
],
/*
|--------------------------------------------------------------------------
| Compiled View Path
|--------------------------------------------------------------------------
|
| This option determines where all the compiled Blade templates will be
| stored for your application. Typically, this is within the storage
| directory. However, as usual, you are free to change this value.
|
*/
'compiled' => env(
'VIEW_COMPILED_PATH',
storage_path('framework/views')
),
];

View File

@@ -68,7 +68,9 @@ return [
'retries' => (int) env('VISION_VECTOR_GATEWAY_RETRIES', 1),
'retry_delay_ms' => (int) env('VISION_VECTOR_GATEWAY_RETRY_DELAY_MS', 250),
'upsert_endpoint' => env('VISION_VECTOR_GATEWAY_UPSERT_ENDPOINT', '/vectors/upsert'),
'upsert_file_endpoint' => env('VISION_VECTOR_GATEWAY_UPSERT_FILE_ENDPOINT', '/vectors/upsert/file'),
'search_endpoint' => env('VISION_VECTOR_GATEWAY_SEARCH_ENDPOINT', '/vectors/search'),
'search_file_endpoint' => env('VISION_VECTOR_GATEWAY_SEARCH_FILE_ENDPOINT', '/vectors/search/file'),
'delete_endpoint' => env('VISION_VECTOR_GATEWAY_DELETE_ENDPOINT', '/vectors/delete'),
'collections_endpoint' => env('VISION_VECTOR_GATEWAY_COLLECTIONS_ENDPOINT', '/vectors/collections'),
],