-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.php
90 lines (84 loc) · 3.19 KB
/
settings.php
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
declare(strict_types=1);
global $osm_app; /* @var \Osm\Core\App $osm_app */
/* @see \Osm\Framework\Settings\Hints\Settings */
return (object)[
'theme' => 'my',
'db' => [
'driver' => 'mysql',
'url' => $_ENV['MYSQL_DATABASE_URL'] ?? null,
'host' => $_ENV['MYSQL_HOST'] ?? 'localhost',
'port' => $_ENV['MYSQL_PORT'] ?? '3306',
'database' => "{$_ENV['MYSQL_DATABASE']}",
'username' => $_ENV['MYSQL_USERNAME'],
'password' => $_ENV['MYSQL_PASSWORD'],
'unix_socket' => $_ENV['MYSQL_SOCKET'] ?? '',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'search' => [
'driver' => 'elastic',
'index_prefix' => $_ENV['SEARCH_INDEX_PREFIX'],
'hosts' => [
$_ENV['ELASTIC_HOST'] ?? 'localhost:9200',
],
'retries' => 2,
],
/* @see \Osm\Framework\Logs\Hints\LogSettings */
'logs' => (object)[
'elastic' => (bool)($_ENV['LOG_ELASTIC'] ?? false),
'db' => (bool)($_ENV['LOG_DB'] ?? false),
],
/* @see \Osm\Docs\Docs\Hints\Settings\Docs */
'docs' => (object)[
'index_modified' => true,
'books' => [
/* @see \Osm\Docs\Docs\Hints\Settings\Book */
'framework' => (object)[
'repo' => 'https://github.com/osmphp/framework.git',
'path' => "{$osm_app->paths->temp}/docs/framework",
'dir' => 'docs',
'color' => 'green-700',
'versions' => [
/* @see \Osm\Docs\Docs\Hints\Settings\Version */
'0.12' => (object)['branch' => 'v0.12'],
'0.13' => (object)['branch' => 'v0.13'],
'0.14' => (object)['branch' => 'v0.14'],
'0.15' => (object)array_merge(['branch' => 'v0.15'],
isset($_ENV['FRAMEWORK_DOC_PATH'])
? [
'branch' => null,
'path' => $_ENV['FRAMEWORK_DOC_PATH'],
]
: []
),
],
],
'admin' => (object)[
'repo' => 'https://github.com/osmphp/admin.git',
'path' => "{$osm_app->paths->temp}/docs/admin",
'dir' => 'docs',
'color' => 'red-800',
'versions' => [
/* @see \Osm\Docs\Docs\Hints\Settings\Version */
'0.1' => (object)['branch' => 'v0.1'],
'0.2' => (object)array_merge(['branch' => 'v0.2'],
isset($_ENV['ADMIN_DOC_PATH'])
? [
'branch' => null,
'path' => $_ENV['ADMIN_DOC_PATH'],
]
: []
),
],
],
],
],
];