-
Notifications
You must be signed in to change notification settings - Fork 11
Setup: Multi Project
-
in
config/projects
create a.php
configuration file for each project - those files are not under version control -
the configuration file name can be anything you like, it will not be used or displayed anywhere
-
look below for an example, in this file you can override almost any configuration key and define new ones with the exception of some keys consumed at bootstrap:
'Cache'
'Datasources'
'EmailTransport'
'Email'
'Log'
'Security.salt'
-
on the login page a select is displayed to choose a project, after login project configuration file is always loaded from
ProjectMiddleware
on every page/request
return [
/**
* Project name.
* [MANDATORY]
*/
'Project' => [
'name' => 'My Project',
],
/**
* API configuration.
* [EXTREMELY RECOMMENDED]
*/
'API' => [
'apiBaseUrl' => 'https://my-api-endpoint',
'apiKey' => 'my-api-key',
// 'log' => [
// 'log_file' => LOGS . 'api.log',
// ],
],
/**
* Modules configuration.
* [RECOMMENDED]
*/
'Modules' => [
// modules conf here
],
/**
* Properties display configuration settings.
* [RECOMMENDED]
*/
'Properties' => [
// properties conf here
],
/**
* Plugins.
* [OPTIONAL]
*/
'Plugins' => [
'MyPlugin' => ['autoload' => true, 'bootstrap' => true, 'routes' => true, 'ignoreMissing' => true],
],
];
What is a Project?: a project in BEdita is an independent data set consisting mainly of objects, resources and media files; you may think of a database with a set of related resources like media files and configurations; each project will expose its own endpoints to applications