Files
librenms-librenms/config/librenms.php
Tony Murray f1e7a218f0 Convert Config to a singleton (#16349)
* Convert Config to a singleton
Continuation of #14364 by @Jellyfrog
This time, make the old class a shim for the facade.  Will update references in a separate PR.

* Remove logging config call

* Apply fixes from StyleCI

* Fix bad Git constructor call

* Fail on config table does not exist instead of throw exception

* Inline LibrenmsConfig::isRegistered()

* Debug call in case there are more issues,
remove before merge.

* Fix up config tests

* Allow config cache controlled by CONFIG_CACHE_TTL (disabled by default for now)

* Enable config cache for tests

* Remove debug statement and deprecation phpdoc

* Apply fixes from StyleCI

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-09-09 18:48:07 +02:00

66 lines
2.1 KiB
PHP

<?php
/*
| !!!! DO NOT EDIT THIS FILE !!!!
|
| You can change settings by setting them in the environment or .env
| If there is something you need to change, but is not available as an environment setting,
| request an environment variable to be created upstream or send a pull request.
*/
return [
/*
|--------------------------------------------------------------------------
| User
|--------------------------------------------------------------------------
|
| This value is the user LibreNMS runs as. It is used to secure permissions
| and grant access to things needed. Defaults to librenms.
*/
'user' => env('LIBRENMS_USER', 'librenms'),
/*
|--------------------------------------------------------------------------
| Group
|--------------------------------------------------------------------------
|
| This value is the group LibreNMS runs as. It is used to secure permissions
| and grant access to things needed. Defaults to the same as LIBRENMS_USER.
*/
'group' => env('LIBRENMS_GROUP', env('LIBRENMS_USER', 'librenms')),
/*
|--------------------------------------------------------------------------
| Install
|--------------------------------------------------------------------------
|
| This value sets if the install process needs to be run.
| You may also specify which install steps to present with a comma separated list.
*/
'install' => env('INSTALL', false),
/*
|--------------------------------------------------------------------------
| NODE ID
|--------------------------------------------------------------------------
|
| Unique value to identify this node. Primarily used for distributed polling.
*/
'node_id' => env('NODE_ID'),
/*
|--------------------------------------------------------------------------
| Config Cache TTL
|--------------------------------------------------------------------------
|
| Amount of seconds to allow the config to be cached. 0 means no cache.
*/
'config_cache_ttl' => env('CONFIG_CACHE_TTL', 0),
];