Application parameters
The parameters are defined in two files: app/Config/App.php and vendor/equinton/ppci/src/Config/IdentificationConfig.php.
While they can all be modified during each implementation using the .env
file at the root of the application, some should not be modified using this mechanism.
Parameters in the .env file are prefixed with either app.
or Ppci\Config\IdentificationConfig.
, depending on their origin. The env file contains all the variables that can be modified when an instance of the software is implemented.
Generic parameters
Parameter (with the radical used in the .env file) | Description | Default value | Modifiable in .env |
---|---|---|---|
app.baseURL | Instance address | mandatory | |
BASE_DIR | variable used in .env, to indicate the path to the application | e.g. “/var/www/collec2” | mandatory |
FRONT_DIR | variable used in .env, to indicate the path to the public folder, the base of web pages | ${BASE_DIR}/public | in principle, no |
app.defaultLocale | Default language in the instance | fr | possible |
app.supportedLocales | Languages managed by the application | [‘fr’,‘en’] | possible, provided that other languages are integrated into the framework |
app.version | Application version | never | |
app.versionDate | Version creation date | never | |
app.dbversion | Database version. The version must also exist in the database dbversion table | never | |
databaseSchemaFile | Path where the png describing the database tables is placed | e.g.: ROOTPATH . “documentation/collec-schema.png” | never |
app.logDuration | Duration, in days, to keep logs in the logs table | 365 | possible |
app.privateKey | location of the private key used for encryption or decryption operations | e.g., ${BASE_DIR}/id_collec | possible |
app.pubKey | location of the public key used for encryption or decryption operations | e.g. ${BASE_DIR}/id_collec.pub | possible |
session.expiration | Session duration, in seconds | 14400 (4 hours) | possible |
app.APPLI_absolute_session | Maximum session duration, in seconds | 36000 (10 hours) | possible |
logger.threshold | Error trigger threshold | 4 | never |
app.APP_mail | application email | mail@mysociety.com | mandatory |
app.MAIL_enabled | If set to 1, sending emails is enabled | 1 | possible |
app.MAIL_param.from | same as APP_mail | mail@mysociety.com | mandatory |
app.MAIL_param.mailDebug | If set to 1, display the content of the email on the screen instead of sending it | 0 | development only |
app.checkRelease | If set to 1, queries the GIT server (Github or Gitlab) for the latest version available, and if the version is different from the one saved (app.version), displays a message on the screen. The specific parameters for querying are described in the App.php file | 0 | possible |
Database Connection Parameters
Parameter | Description | Default | Can be changed in .env |
---|---|---|---|
database.default.hostname | server name or address | localhost | yes |
database.default.database | database name | yes | |
database.default.username | login account name | yes | |
database.default.password | associated password | yes | |
database.default.DBDriver | driver name | Postgre | no |
database.default.port | connection port | 5432 | yes |
database.default.searchpath | comma-separated list of schemas used in the database | e.g. col,gacl,public | normally no |
database.default.charset | character set used in the database | utf8 | never |