Add src/settings.php back
This commit is contained in:
parent
a514c7a329
commit
9219be87a2
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,5 +1,2 @@
|
||||||
src/settings.php
|
|
||||||
vendor/
|
vendor/
|
||||||
/logs/*
|
|
||||||
!/logs/README.md
|
|
||||||
cache/
|
cache/
|
63
src/settings.php
Normal file
63
src/settings.php
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/* Local settings; not checked into git. */
|
||||||
|
$localSettings = [];
|
||||||
|
if (\is_readable(__DIR__ . '/../config/local.json')) {
|
||||||
|
$settingsFile = \file_get_contents(__DIR__ . '/../config/local.json');
|
||||||
|
if (\is_string($settingsFile)) {
|
||||||
|
/** @var array $localSettings */
|
||||||
|
$localSettings = \json_decode($settingsFile, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Full directory settings list
|
||||||
|
*
|
||||||
|
* Please don't change any value here, instead put them into config/local.json following the same structure.
|
||||||
|
*/
|
||||||
|
$settings = [
|
||||||
|
'displayErrorDetails' => false, // set to false in production
|
||||||
|
'addContentLengthHeader' => false, // Allow the web server to send the content-length header
|
||||||
|
// Escaper settings
|
||||||
|
'escaper' => [
|
||||||
|
'encoding' => 'utf-8'
|
||||||
|
],
|
||||||
|
// Renderer settings
|
||||||
|
'renderer' => [
|
||||||
|
'template_path' => __DIR__ . '/templates/',
|
||||||
|
],
|
||||||
|
// Monolog settings
|
||||||
|
'logger' => [
|
||||||
|
'name' => 'friendica-directory',
|
||||||
|
'path' => __DIR__ . '/../logs/app.log',
|
||||||
|
// This has to be translated to a numeric level (lowest priority 100-600 highest priority) in config/local.json
|
||||||
|
'level' => \Monolog\Logger::WARNING,
|
||||||
|
'formatter' => 'logfile',
|
||||||
|
],
|
||||||
|
// Dummy database settings, please run "bin/console install" to set them up for your instance
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'mysql',
|
||||||
|
'hostname' => 'localhost',
|
||||||
|
'database' => 'friendica-directory',
|
||||||
|
'username' => 'friendica-directory',
|
||||||
|
'password' => 'friendica-directory',
|
||||||
|
],
|
||||||
|
'simplecache' => [
|
||||||
|
'directory' => __DIR__ . '/../cache/',
|
||||||
|
],
|
||||||
|
'poller' => [
|
||||||
|
// Successful poll delay
|
||||||
|
'directory_poll_delay' => 3600, // 1 hour
|
||||||
|
'server_poll_delay' => 24 * 3600, // 1 day
|
||||||
|
'profile_poll_delay' => 24 * 3600, // 1 day
|
||||||
|
|
||||||
|
// Unsuccessful poll base delay
|
||||||
|
'directory_poll_retry_base_delay' => 600, // 10 minutes
|
||||||
|
'server_poll_retry_base_delay' => 1800, // 30 minutes
|
||||||
|
'profile_poll_retry_base_delay' => 1800, // 30 minutes
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
return [
|
||||||
|
'settings' => $localSettings + $settings
|
||||||
|
];
|
Loading…
Reference in a new issue