-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
40 lines (33 loc) · 1.15 KB
/
config.php
File metadata and controls
40 lines (33 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
\Core\Environment\DotEnv::Initialize(__DIR__ . '/.env');
$config = [
// Database Module
"database" => [
"host" => getenv("DB_HOST") ?: "host.docker.internal",
"port" => getenv("DB_PORT") ?: 3306,
"database" => getenv("DB_NAME") ?: "phlog",
"username" => getenv("DB_USER") ?: "root",
"password" => getenv("DB_PASS") ?: ""
],
"redis" => [
"host" => getenv("REDIS_HOST") ?: "redis_cache",
"port" => getenv("REDIS_PORT") ?: 6379,
"prefix" => getenv("REDIS_PREFIX") ?: "app:",
"timeout" => getenv("REDIS_TIMEOUT") ?: 0,
"database" => getenv("REDIS_DATABASE") ?: 0,
],
"cache" => [
"use_cache" => getenv("CACHE_USE") ?: false,
"ttl" => getenv("CACHE_TTL") ?: 0
],
// Route Module
'routes' => require __DIR__ . '/src/App/routing.php',
// Logger Module
'logger' => [
'name' => getenv("LOGGER_NAME") ?: "app",
'outdir' => getenv("LOGGER_DIR") ?: __DIR__ . '/var/logs',
'path' => getenv("LOGGER_PATH") ?: __DIR__ . '/var/logs',
'minlevel' => getenv("LOGGER_MIN_LEVEL") ?: "info",
]
];
return $config;