Configuration Environment

Seme Framework has supported configuration file by environments.

Prioritize

Seme Framework will read the configuration with this order:

  1. production.php
  2. staging.php
  3. development.php

Production Phase

On production.php file, you can put your configuration for production environment. Like database connection, base url, etc. Also, you can put any additional config values of production phase only.

You have to exclude the app/config/production.php from git by adding it on .gitignore. So, you can pull at any time in production server. But, be careful wrong .gitignore configuration can deleted some files or directories.

Staging Phase

On staging.php file, you can put your configuration for staging environment. Like database connection, base url, etc. Also, you can put any additional config values of staging phase only.

You have to exclude the app/config/staging.php from git by adding it on .gitignore. So, you can pull at any time in staging server. But, be careful wrong git configuration can deleted some files or directories.

Development Phase

This is default configuration phase. On development file, you can put your configuration for development environment. Like database connection, base url, etc. Also, you can put any additional config values of development phase only.

Example, Base URL with custom port on Development Phase

Seme Framework can be running with overriden default http port e.g. 8080

Todo so, you have to edit the $site value on app/config/development.php file.

$site = "http://localhost:8080/seme-framework/";

But if using $_SERVER['HTTP_HOST'] there is no necessary to add suffix port after it.

$site = "http://".$_SERVER['HTTP_HOST']."/seme-framework/";