Configuration files
Way to store configuration in Unmark
Unmark is being developed using CodeIgniter PHP framework. In order to stick to framework's standards, configuration files for Unmark should be placed in following locations:
Environment configs
Unmark can have multiple environments configured. In order to pick environment following files can be created (in order of preference):
- application/config/environment.php
- /etc/unmark/environment.php Each of these files should be valid PHP script like defining ENVIRONMENT constant:
<?php define('ENVIRONMENT', 'production');
Application configs
Standard file name is config.php. Locations where file can be stored are:
-
application/config/config.php(standard config with default values - commited into repo to contain feasible defaults) -
application/config/$ENVIRONMENT/config.php- overrides standard config file (all files matchingapplication/config/*/*are added to.gitignore, so not being shared in the repo). Can contain settings typical for selected environment -
application/config/all/app.php- This is a tracked file that store general application configurations that are used in all enviroments. Read about this configuration here
#####Read more about Codeigniter Configs
Database configs
Standard file name is database.php. Locations:
-
application/config/database.php(standard config, added to .gitignore so we're not sharing our DB credentials with everyone ;)). The file can be created based on application/config/database-sample.php, which contains file draft -
application/config/$ENVIRONMENT/database.php- settings for particular environment (all files matching application/config// are added to .gitignore, so not being shared in the repo)