Drop app_local.php from production and show the mail transport in polls remind
app_local.php takes precedence over config/.env, so a copy made from an older template forced the file transport and reminders never left the server. Release package and Docker image now ship without it; app.php reads the database from DATABASE_URL (SQLite default). app_local.example.php keeps development defaults only. polls remind prints the transport and warns when SMTP_HOST is set but SMTP is not used. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f21aead039
commit
7fa33bbbdd
10 files changed
+65
-50
No files matched your search
@@ -372,6 +372,10 @@ return [
|
||||
'default' => [
|
||||
'className' => Connection::class,
|
||||
'driver' => Sqlite::class,
|
||||
// Default: SQLite file in data/. For MySQL/MariaDB/PostgreSQL set DATABASE_URL, e.g.
|
||||
// mysql://user:pass@localhost/plenario?encoding=utf8mb4
|
||||
'database' => ROOT . DS . 'data' . DS . 'plenario.sqlite',
|
||||
'url' => env('DATABASE_URL', null),
|
||||
'persistent' => false,
|
||||
'timezone' => 'UTC',
|
||||
|
||||
@@ -415,6 +419,8 @@ return [
|
||||
'test' => [
|
||||
'className' => Connection::class,
|
||||
'driver' => Sqlite::class,
|
||||
'database' => ROOT . DS . 'tmp' . DS . 'tests.sqlite',
|
||||
'url' => env('DATABASE_TEST_URL', null),
|
||||
'persistent' => false,
|
||||
'timezone' => 'UTC',
|
||||
'encoding' => 'utf8',
|
||||
|
||||
@@ -1,65 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* Local configuration overrides for Plenario.
|
||||
* Development defaults for PlenarIO. Only for local work: `composer install` copies this file to
|
||||
* config/app_local.php (gitignored, never overwritten afterwards).
|
||||
*
|
||||
* 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.
|
||||
* Production does NOT use app_local.php. Everything is configured in config/.env or real environment
|
||||
* variables (see config/.env.example); config/app.php reads them. The release package and the Docker image
|
||||
* ship without app_local.php on purpose: it takes precedence over the environment, so a stale copy would
|
||||
* silently override settings (e.g. force the file mail transport).
|
||||
*/
|
||||
|
||||
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' => [
|
||||
// Replaced by a random value during `composer install`
|
||||
'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.
|
||||
*/
|
||||
// Mails are written as .eml files to tmp/mails/ unless an SMTP server is configured
|
||||
'default' => env('SMTP_HOST') || env('EMAIL_TRANSPORT_DEFAULT_URL') ? [] : [
|
||||
'className' => \App\Mailer\Transport\FileTransport::class,
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user