Files
nexusphp/config/nexus.php

65 lines
2.1 KiB
PHP
Raw Normal View History

2021-01-30 13:53:15 +08:00
<?php
return [
2021-04-02 19:48:41 +08:00
'timezone' => nexus_env('TIMEZONE', 'PRC'),
2021-01-30 13:53:15 +08:00
2021-04-02 19:48:41 +08:00
'log_file' => nexus_env('LOG_FILE', '/tmp/nexus.log'),
2021-01-30 13:53:15 +08:00
2021-04-02 19:48:41 +08:00
'log_split' => nexus_env('LOG_SPLIT', 'daily'),
2021-01-30 13:53:15 +08:00
2021-04-02 19:48:41 +08:00
'mysql' => [
'driver' => 'mysql',
'url' => nexus_env('DATABASE_URL'),
2021-04-30 15:10:31 +08:00
'host' => nexus_env('DB_HOST', '127.0.0.1'),
2022-05-31 20:49:54 +08:00
'port' => (int)nexus_env('DB_PORT', 3306),
2021-04-30 15:10:31 +08:00
'username' => nexus_env('DB_USERNAME', 'root'),
'password' => nexus_env('DB_PASSWORD', ''),
'database' => nexus_env('DB_DATABASE', 'nexusphp'),
'unix_socket' => nexus_env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => false,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => nexus_env('MYSQL_ATTR_SSL_CA'),
]) : [],
2021-04-02 19:48:41 +08:00
],
'redis' => [
'host' => nexus_env('REDIS_HOST', '127.0.0.1'),
2022-05-31 20:49:54 +08:00
'port' => (int)nexus_env('REDIS_PORT', 6379),
2021-04-30 15:10:31 +08:00
'database' => nexus_env('REDIS_DB', 0),
2022-04-21 16:14:08 +08:00
'password' => nexus_env('REDIS_PASSWORD'),
2021-04-02 19:48:41 +08:00
],
2022-03-26 04:27:04 +08:00
'elasticsearch' => [
'hosts' => [
[
'host' => nexus_env('ELASTICSEARCH_HOST','localhost'),
2022-05-31 20:49:54 +08:00
'port' => (int)nexus_env('ELASTICSEARCH_PORT','9200'),
2022-03-26 04:27:04 +08:00
'scheme' => nexus_env('ELASTICSEARCH_SCHEME','https'),
'user' => nexus_env('ELASTICSEARCH_USER','elastic'),
'pass' => nexus_env('ELASTICSEARCH_PASS',''),
]
],
'ssl_verification' => nexus_env('ELASTICSEARCH_SSL_VERIFICATION', ''),
],
'meilisearch' => [
'scheme' => nexus_env('MEILISEARCH_SCHEME', 'http'),
'host' => nexus_env('MEILISEARCH_HOST', '127.0.0.1'),
'port' => (int)nexus_env('MEILISEARCH_PORT', '7700'),
'master_key' => nexus_env('MEILISEARCH_MASTER_KEY', ''),
],
2022-03-26 04:27:04 +08:00
2025-03-29 15:08:34 +07:00
'nas_tools_key' => nexus_env('NAS_TOOLS_KEY', ''),
'iyuu_secret' => nexus_env('IYUU_SECRET', ''),
'ammds_secret' => nexus_env('AMMDS_SECRET', ''),
2021-04-02 19:48:41 +08:00
];