|
4 | 4 | THIS IS A TEMPLATE! Pick what you need for your app
|
5 | 5 | **********************************************************/
|
6 | 6 | return array(
|
| 7 | + // The Application class |
7 | 8 | 'application' => 'MyWebApp\\Application',
|
| 9 | + // The theme |
8 | 10 | 'theme' => 'WebApp\\BootstrapTheme\\BootstrapTheme',
|
| 11 | + // The name as it appears in page headers |
9 | 12 | 'name' => 'My Bootstrap App',
|
10 |
| - //'brandLogo' => 'my-logo.png', |
| 13 | + // A logo (used in layouts) |
| 14 | + 'brandLogo' => 'my-logo.png', |
| 15 | + // A copyright for a footer |
11 | 16 | 'copyright' => '© '.date('Y').' by TechnicalGuru',
|
12 |
| - 'debug' => true, |
| 17 | + // Be verbose about messages in UI (Do not enable in productive environments) |
| 18 | + 'debug' => false, |
| 19 | + // Switch on maintenance mode when you dont want front-end users to use yr app |
| 20 | + 'maintenance' => false, |
| 21 | + |
| 22 | + // The router class for your app |
13 | 23 | 'router' => array(
|
14 | 24 | 'class' => 'WebApp\\Router',
|
15 | 25 | 'config' => array(
|
|
28 | 38 | 'logout' => '/index.html',
|
29 | 39 | 'forget_password' => '/forgot-password.html',
|
30 | 40 | ),
|
| 41 | + // Configuration of a vault (github.com/technicalguru/php-vault) |
| 42 | + 'vault' => array( |
| 43 | + // see php-vault doc for possible types |
| 44 | + 'type' => 'none', |
| 45 | + // see php-vault doc for config |
| 46 | + 'config' => array( |
| 47 | + // Only for hashicorp vaults |
| 48 | + 'uri' => 'http://myvault', |
| 49 | + 'roleId' => 'roleId', |
| 50 | + 'secretId' => 'secretId', |
| 51 | + 'renewTokens' => false, |
| 52 | + 'maxTtl' => 900, |
| 53 | + // Only for file vaults |
| 54 | + 'filename' => '/etc/ticketing.secrets', |
| 55 | + // Only for memory vault |
| 56 | + 'secrets' => '{"json-values"}', |
| 57 | + ), |
| 58 | + ), |
| 59 | + // see github.com/technicalguru/php-database |
31 | 60 | 'database' => array(
|
32 | 61 | 'host' => 'my-db-host',
|
33 | 62 | 'port' => 3306,
|
34 |
| - 'user' => 'my-db-user', |
35 |
| - 'pass' => 'my-db-password', |
36 | 63 | 'dbname' => 'my-db-instance-name',
|
37 | 64 | 'tablePrefix' => 'mywebapp_',
|
| 65 | + // Specify where in vault the username and secret is |
| 66 | + 'security' => array( |
| 67 | + 'type' => 'vault', |
| 68 | + 'path' => '/path/to/vault/secret', |
| 69 | + ), |
| 70 | + // Or simply give auth data here |
| 71 | + 'user' => 'my-db-user', |
| 72 | + 'pass' => 'my-db-password', |
38 | 73 | ),
|
| 74 | + // Use a data model |
39 | 75 | 'dataModel' => true,
|
40 |
| - 'authentication' => 'WebApp\\Auth\\UserDatabaseAuthenticator', |
41 |
| - 'authorization' => 'WebApp\\Auth\\UserRoleAuthorizator', |
| 76 | + // Use a service factory |
| 77 | + 'serviceFactory' => array( |
| 78 | + 'class' => 'MyWebApp\\Service\\ServiceFactory', |
| 79 | + ), |
| 80 | + // Use your own User class (recommended) |
| 81 | + 'authentication' => array( |
| 82 | + 'class' => 'WebApp\\Auth\\UserDatabaseAuthenticator', |
| 83 | + 'config' => array( |
| 84 | + 'modelClass' => 'MyWebApp\\DataModel\\User', |
| 85 | + ), |
| 86 | + ), |
| 87 | + // Alternative default usage: |
| 88 | + // 'authentication' => 'WebApp\\Auth\\UserDatabaseAuthenticator', |
| 89 | + |
| 90 | + // Configure the authorizator class |
| 91 | + 'authorization' => array( |
| 92 | + 'class' => 'WebApp\\Auth\\UserRoleAuthorizator', |
| 93 | + 'config' => array( |
| 94 | + // Configure here |
| 95 | + ), |
| 96 | + ), |
| 97 | + // Alternative default usage: |
| 98 | + // 'authorization' => 'WebApp\\Auth\\UserRoleAuthorizator', |
| 99 | + |
| 100 | + // Mail config, see github.com/technicalguru/php-email |
42 | 101 | 'mailQueue' => array(
|
43 | 102 | 'timezone' => 'Europe/Berlin',
|
44 | 103 | 'mailMode' => 'reroute',
|
| 104 | + // Use username and password from vault |
| 105 | + 'security' => array( |
| 106 | + 'type' => 'vault', |
| 107 | + 'path' => '/path/to/vault/secret', |
| 108 | + ), |
45 | 109 | 'smtpConfig' => array(
|
46 | 110 | 'host' => 'my-smtp-server',
|
47 | 111 | 'port' => 587,
|
48 | 112 | 'debugLevel' => 0,
|
49 | 113 | 'auth' => true,
|
50 | 114 | 'secureOption' => 'starttls',
|
51 | 115 | 'charset' => 'utf8',
|
| 116 | + // Only when not using a vault |
52 | 117 | 'credentials' => array(
|
53 | 118 | 'user' => 'my-smtp-username',
|
54 | 119 | 'pass' => 'my-smtp-password',
|
|
65 | 130 | 'defaultSender' => 'My WebApp <noreply@example.com>',
|
66 | 131 | 'subjectPrefix' => '[My WebApp] ',
|
67 | 132 | ),
|
| 133 | + // Log Level, see github.com/technicalguru/php-utils |
| 134 | + 'logLevel' => "error", |
| 135 | + // Save error messages in database |
| 136 | + 'logErrors' => true, |
| 137 | + // Save simplified access log in database |
| 138 | + 'accessLog' => true, |
68 | 139 | );
|
69 | 140 |
|
0 commit comments