summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/auth/env.example36
-rw-r--r--core/config/anom_settings.php16
2 files changed, 43 insertions, 9 deletions
diff --git a/core/auth/env.example b/core/auth/env.example
new file mode 100644
index 0000000..fd47dd8
--- /dev/null
+++ b/core/auth/env.example
@@ -0,0 +1,36 @@
+ENVIRONMENT='development'
+
+# MySQL connection
+# --- -- -- - - -
+DB_NAME=
+DB_USER=
+DB_PASS=
+PDO_HOST=
+
+# mailhog
+# == testting/fake email service
+# --- -- -- - - -
+# MAIL_HOST=mailhog_server
+# MAIL_PORT=1025
+# MAIL_USERNAME=
+# MAIL_PASSWORD=
+# MAIL_ENCRYPTION=
+
+# SMTP setup
+# == read mail server
+# --- -- -- - - -
+MAIL_MAILER=smtp
+MAIL_HOST=
+MAIL_PORT=465
+MAIL_USERNAME=
+MAIL_PASSWORD=
+MAIL_ENCRYPTION=ssl
+NO_REPLY_EMAIL=noreply@...
+REPLY_TO_EMAIL=webmaster@r...
+MAIL_FROM_NAME=Classroom
+
+# redis cache server
+# --- -- -- - - -
+# REDIS_HOST=redis
+# REDIS_PASSWORD=
+# REDIS_PORT=6379 \ No newline at end of file
diff --git a/core/config/anom_settings.php b/core/config/anom_settings.php
index 76c7c62..399c180 100644
--- a/core/config/anom_settings.php
+++ b/core/config/anom_settings.php
@@ -12,7 +12,7 @@
*/
if (file_exists("../core/auth/.env")) {
- $ini_array = parse_ini_file("../core/auth/.env");
+ $ini = parse_ini_file("../core/auth/.env");
}
// DEFINE WHETTHER THE APP RUNS ON PRODUCTION
@@ -30,7 +30,7 @@ if (file_exists("../core/auth/.env")) {
# }
# define by .env file
-define('PRODUCTION', ($ini_array['ENVIRONMENT'] == 'production') );
+define('PRODUCTION', ($ini['ENVIRONMENT'] == 'production') );
@@ -243,15 +243,13 @@ define('CSRF_EXCLUDE_URIS', array()); // Array of URIs which ignore CSRF check
* -----------------------------------------------------------------------------
*/
- $ini_array = parse_ini_file("../core/auth/.env");
-
- define('DB_NAME', $ini_array['DB_NAME']);
+define('DB_NAME', $ini['DB_NAME']);
- define('DB_USER', $ini_array['DB_USER']);
+define('DB_USER', $ini['DB_USER']);
- define('DB_PASS', $ini_array['DB_PASS']);
+define('DB_PASS', $ini['DB_PASS']);
- define('PDO_HOST', $ini_array['PDO_HOST']);
+define('PDO_HOST', $ini['PDO_HOST']);
/** This is just good enough
@@ -286,7 +284,7 @@ define('CSRF_EXCLUDE_URIS', array()); // Array of URIs which ignore CSRF check
#
# }
- define('DB_TIMEZONE', "SET time_zone = 'Europe/Athens'");
+define('DB_TIMEZONE', "SET time_zone = 'Europe/Athens'");
/** NOTE:
* Both Redis and Memcached configurations are given as a template to work on;