Add SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD and SMTP_TLS instead of requiring a transport URL, so passwords need no URL escaping. Port 465 uses implicit SSL. EMAIL_TRANSPORT_DEFAULT_URL keeps working as a fallback. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
68 lines
2.2 KiB
PHP
68 lines
2.2 KiB
PHP
<?php
|
|
/*
|
|
* Local configuration overrides for Plenario.
|
|
*
|
|
* Copy this file to config/app_local.php (done automatically by
|
|
* `composer install`) and adjust it. app_local.php is NOT committed.
|
|
*
|
|
* Every value can alternatively be provided via environment variables.
|
|
*/
|
|
|
|
use Cake\Database\Driver\Sqlite;
|
|
use function Cake\Core\env;
|
|
|
|
return [
|
|
'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
|
|
|
|
'App' => [
|
|
// Absolute base URL used for links in e-mails, e.g. https://plenario.example.org
|
|
'fullBaseUrl' => env('APP_FULL_BASE_URL', 'http://localhost:8765'),
|
|
],
|
|
|
|
'Security' => [
|
|
'salt' => env('SECURITY_SALT', '__SALT__'),
|
|
],
|
|
|
|
'Plenario' => [
|
|
'captcha' => [
|
|
// 'none' | 'math' | 'recaptcha'
|
|
'type' => env('CAPTCHA_TYPE', 'math'),
|
|
'recaptcha' => [
|
|
'siteKey' => env('RECAPTCHA_SITE_KEY', ''),
|
|
'secretKey' => env('RECAPTCHA_SECRET_KEY', ''),
|
|
],
|
|
],
|
|
// Shows the admin link on the confirmation page. Development only!
|
|
'showAdminLinkAfterCreate' => filter_var(env('SHOW_ADMIN_LINK_AFTER_CREATE', env('DEBUG', true)), FILTER_VALIDATE_BOOLEAN),
|
|
],
|
|
|
|
'Datasources' => [
|
|
/*
|
|
* Default: SQLite file in data/. For MySQL/MariaDB/PostgreSQL set
|
|
* DATABASE_URL, e.g.
|
|
* mysql://user:pass@localhost/plenario?encoding=utf8mb4
|
|
*/
|
|
'default' => [
|
|
'driver' => Sqlite::class,
|
|
'database' => ROOT . DS . 'data' . DS . 'plenario.sqlite',
|
|
'url' => env('DATABASE_URL', null),
|
|
],
|
|
'test' => [
|
|
'driver' => Sqlite::class,
|
|
'database' => ROOT . DS . 'tmp' . DS . 'tests.sqlite',
|
|
'url' => env('DATABASE_TEST_URL', null),
|
|
],
|
|
],
|
|
|
|
'EmailTransport' => [
|
|
/*
|
|
* Local default: mails are written as .eml files to tmp/mails/.
|
|
* For real delivery set SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD and SMTP_TLS
|
|
* (see config/.env.example); then this override is skipped.
|
|
*/
|
|
'default' => env('SMTP_HOST') || env('EMAIL_TRANSPORT_DEFAULT_URL') ? [] : [
|
|
'className' => \App\Mailer\Transport\FileTransport::class,
|
|
],
|
|
],
|
|
];
|