mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Docker-readiness
This commit is contained in:
@@ -54,7 +54,9 @@
|
||||
* NOTE: If you change these, also change the error_reporting() code below
|
||||
*/
|
||||
#define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
|
||||
if (file_exists('.debug')) {
|
||||
if (isset($_SERVER['CI_ENV'])) {
|
||||
define('ENVIRONMENT', $_SERVER['CI_ENV']) {
|
||||
elseif (file_exists('.debug')) {
|
||||
define('ENVIRONMENT', 'development');
|
||||
} else if (file_exists('.maintenance')) {
|
||||
define('ENVIRONMENT', 'maintenance');
|
||||
|
||||
@@ -107,12 +107,14 @@ class Core
|
||||
}
|
||||
|
||||
// Function to write the config file
|
||||
function write_config($data)
|
||||
{
|
||||
function write_config($data) {
|
||||
|
||||
// Config path
|
||||
$template_path = 'config/database.php';
|
||||
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/config/database.php';
|
||||
if (isset($_SERVER['CI_ENV'])) {
|
||||
$template_path = $_SERVER['CI_ENV'].'/database.php';
|
||||
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/'.$_SERVER['CI_ENV'].'/database.php';
|
||||
}
|
||||
|
||||
// Open the file
|
||||
$database_file = file_get_contents($template_path);
|
||||
@@ -147,12 +149,14 @@ class Core
|
||||
}
|
||||
|
||||
// Function to write the config file
|
||||
function write_configfile($data)
|
||||
{
|
||||
function write_configfile($data) {
|
||||
|
||||
// Config path
|
||||
$template_path = 'config/config.php';
|
||||
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/config/config.php';
|
||||
if (isset($_SERVER['CI_ENV'])) {
|
||||
$template_path = $_SERVER['CI_ENV'].'/config.php';
|
||||
$output_path = $_SERVER['DOCUMENT_ROOT'] . '/' . $data['directory'] . '/application/'.$_SERVER['CI_ENV'].'/config.php';
|
||||
}
|
||||
|
||||
// Open the file
|
||||
$database_file = file_get_contents($template_path);
|
||||
|
||||
@@ -24,6 +24,9 @@ if (file_exists('config_unattended.php')) {
|
||||
|
||||
// Config Paths
|
||||
$db_config_path = '../application/config/';
|
||||
if (isset($_SERVER['CI_ENV'])) {
|
||||
$db_config_path ='../application/'.$_SERVER['CI_ENV'].'/';
|
||||
}
|
||||
$db_file_path = $db_config_path . "database.php";
|
||||
|
||||
// if you need to disabled all button locks you can create a root_mode file in the /install directory
|
||||
|
||||
Reference in New Issue
Block a user