mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 04:04:45 +02:00
cleanup panel
config file (#1198)
This commit is contained in:
parent
0cce716e2c
commit
ed88ce9ae3
@ -47,14 +47,6 @@ class EnvironmentService
|
|||||||
$variables->put($key, object_get($server, $object));
|
$variables->put($key, object_get($server, $object));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process variables set in the configuration file.
|
|
||||||
foreach (config('panel.environment_variables', []) as $key => $object) {
|
|
||||||
$variables->put(
|
|
||||||
$key,
|
|
||||||
is_callable($object) ? call_user_func($object, $server) : object_get($server, $object)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Process dynamically included environment variables.
|
// Process dynamically included environment variables.
|
||||||
foreach ($this->additional as $key => $closure) {
|
foreach ($this->additional as $key => $closure) {
|
||||||
$variables->put($key, call_user_func($closure, $server));
|
$variables->put($key, call_user_func($closure, $server));
|
||||||
|
127
config/panel.php
127
config/panel.php
@ -1,13 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Authentication
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Should login success and failure events trigger an email to the user?
|
|
||||||
*/
|
|
||||||
|
|
||||||
'auth' => [
|
'auth' => [
|
||||||
'2fa_required' => env('APP_2FA_REQUIRED', 0),
|
'2fa_required' => env('APP_2FA_REQUIRED', 0),
|
||||||
@ -18,65 +11,15 @@ return [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Pagination
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Certain pagination result counts can be configured here and will take
|
|
||||||
| effect globally.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'paginate' => [
|
|
||||||
'frontend' => [
|
|
||||||
'servers' => env('APP_PAGINATE_FRONT_SERVERS', 15),
|
|
||||||
],
|
|
||||||
'admin' => [
|
|
||||||
'servers' => env('APP_PAGINATE_ADMIN_SERVERS', 25),
|
|
||||||
'users' => env('APP_PAGINATE_ADMIN_USERS', 25),
|
|
||||||
],
|
|
||||||
'api' => [
|
|
||||||
'nodes' => env('APP_PAGINATE_API_NODES', 25),
|
|
||||||
'servers' => env('APP_PAGINATE_API_SERVERS', 25),
|
|
||||||
'users' => env('APP_PAGINATE_API_USERS', 25),
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Guzzle Connections
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Configure the timeout to be used for Guzzle connections here.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'guzzle' => [
|
'guzzle' => [
|
||||||
'timeout' => env('GUZZLE_TIMEOUT', 15),
|
'timeout' => env('GUZZLE_TIMEOUT', 15),
|
||||||
'connect_timeout' => env('GUZZLE_CONNECT_TIMEOUT', 5),
|
'connect_timeout' => env('GUZZLE_CONNECT_TIMEOUT', 5),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| CDN
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Information for the panel to use when contacting the CDN to confirm
|
|
||||||
| if panel is up to date.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'cdn' => [
|
'cdn' => [
|
||||||
'cache_time' => 60,
|
'cache_time' => 60,
|
||||||
'url' => 'https://cdn.pelican.dev/releases/latest.json',
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Client Features
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Allow clients to turn features on or off
|
|
||||||
*/
|
|
||||||
|
|
||||||
'client_features' => [
|
'client_features' => [
|
||||||
'databases' => [
|
'databases' => [
|
||||||
'enabled' => env('PANEL_CLIENT_DATABASES_ENABLED', true),
|
'enabled' => env('PANEL_CLIENT_DATABASES_ENABLED', true),
|
||||||
@ -95,56 +38,10 @@ return [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| File Editor
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This array includes the MIME filetypes that can be edited via the web.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'files' => [
|
'files' => [
|
||||||
'max_edit_size' => env('PANEL_FILES_MAX_EDIT_SIZE', 1024 * 1024 * 4),
|
'max_edit_size' => env('PANEL_FILES_MAX_EDIT_SIZE', 1024 * 1024 * 4),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Dynamic Environment Variables
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Place dynamic environment variables here that should be auto-appended
|
|
||||||
| to server environment fields when the server is created or updated.
|
|
||||||
|
|
|
||||||
| Items should be in 'key' => 'value' format, where key is the environment
|
|
||||||
| variable name, and value is the server-object key. For example:
|
|
||||||
|
|
|
||||||
| 'P_SERVER_CREATED_AT' => 'created_at'
|
|
||||||
*/
|
|
||||||
|
|
||||||
'environment_variables' => [
|
|
||||||
'P_SERVER_ALLOCATION_LIMIT' => 'allocation_limit',
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Asset Verification
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This section controls the output format for JS & CSS assets.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'assets' => [
|
|
||||||
'use_hash' => env('PANEL_USE_ASSET_HASH', false),
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Email Notification Settings
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This section controls what notifications are sent to users.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'email' => [
|
'email' => [
|
||||||
// Should an email be sent to a server owner once their server has completed it's first install process?
|
// Should an email be sent to a server owner once their server has completed it's first install process?
|
||||||
'send_install_notification' => env('PANEL_SEND_INSTALL_NOTIFICATION', true),
|
'send_install_notification' => env('PANEL_SEND_INSTALL_NOTIFICATION', true),
|
||||||
@ -152,14 +49,6 @@ return [
|
|||||||
'send_reinstall_notification' => env('PANEL_SEND_REINSTALL_NOTIFICATION', true),
|
'send_reinstall_notification' => env('PANEL_SEND_REINSTALL_NOTIFICATION', true),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| FilamentPHP Settings
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This section controls Filament configurations
|
|
||||||
*/
|
|
||||||
|
|
||||||
'filament' => [
|
'filament' => [
|
||||||
'top-navigation' => env('FILAMENT_TOP_NAVIGATION', false),
|
'top-navigation' => env('FILAMENT_TOP_NAVIGATION', false),
|
||||||
'display-width' => env('FILAMENT_WIDTH', 'screen-2xl'),
|
'display-width' => env('FILAMENT_WIDTH', 'screen-2xl'),
|
||||||
@ -169,27 +58,11 @@ return [
|
|||||||
|
|
||||||
'editable_server_descriptions' => env('PANEL_EDITABLE_SERVER_DESCRIPTIONS', true),
|
'editable_server_descriptions' => env('PANEL_EDITABLE_SERVER_DESCRIPTIONS', true),
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| API Settings
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This section controls Api Key configurations
|
|
||||||
*/
|
|
||||||
|
|
||||||
'api' => [
|
'api' => [
|
||||||
'key_limit' => env('API_KEYS_LIMIT', 25),
|
'key_limit' => env('API_KEYS_LIMIT', 25),
|
||||||
'key_expire_time' => env('API_KEYS_EXPIRE_TIME', 720),
|
'key_expire_time' => env('API_KEYS_EXPIRE_TIME', 720),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Webhook Settings
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This section controls Webhook configurations
|
|
||||||
*/
|
|
||||||
|
|
||||||
'webhook' => [
|
'webhook' => [
|
||||||
'prune_days' => env('APP_WEBHOOK_PRUNE_DAYS', 30),
|
'prune_days' => env('APP_WEBHOOK_PRUNE_DAYS', 30),
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user