Aligining the Dockerfile with the version in friendica/docker repository

This commit is contained in:
ne20002 2024-08-31 14:54:05 +00:00
parent 07d6500700
commit f1301aec73
No known key found for this signature in database
9 changed files with 157 additions and 29 deletions

View file

@ -0,0 +1,11 @@
<?php
/**
* If nothing else set, use APCu as a caching driver (best performance for local caching)
*/
return [
'system' => [
'cache_driver' => 'apcu',
],
];

View file

@ -0,0 +1,17 @@
<?php
if (getenv('REDIS_HOST')) {
return [
'system' => [
'session_handler' => 'cache',
'distributed_cache_driver' => 'redis',
'lock_driver' => 'redis',
'redis_host' => getenv('REDIS_HOST'),
'redis_port' => (getenv('REDIS_PORT') ?: ''),
'redis_password' => (getenv('REDIS_PW') ?: ''),
'redis_db' => (getenv('REDIS_DB') ?: 0),
],
];
} else {
return [];
}

View file

@ -31,7 +31,6 @@ return [
'default_timezone' => 'UTC',
'language' => 'en',
'basepath' => '${workspaceFolder}',
'url' => 'http://${ServerName}:${ServerPort}',
'pidfile' => '/tmp/daemon.pid',
'url' => 'http://${ServerName}:${ServerPort}'
],
];

View file

@ -0,0 +1,34 @@
<?php
/**
* Fallback config to make it possible overwriting config values
* because of docker environment variables
*
* This doesn't affect DB configurations, but will replace other config values
*/
$config = [
'system' => [
// Necessary because otherwise the daemon isn't working
'pidfile' => '/tmp/friendica.pid',
'logfile' => '/var/www/html/friendica.log',
'loglevel' => 'notice',
],
'storage' => [
'filesystem_path' => '/var/www/html/storage',
],
];
if (!empty(getenv('FRIENDICA_NO_VALIDATION'))) {
$config['system']['disable_url_validation'] = true;
$config['system']['disable_email_validation'] = true;
}
if (!empty(getenv('SMTP_DOMAIN'))) {
$smtp_from = !empty(getenv('SMTP_FROM')) ? getenv('SMTP_FROM') : 'no-reply';
$config['config']['sender_email'] = $smtp_from . "@" . getenv('SMTP_DOMAIN');
}
return $config;