123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <?php
- $dc = array();
- $dc_file = '/data/dm/container/share/dc/config.php';
- if (is_file($dc_file)) {
- $dc = include($dc_file);
- }
- $config['base'] = array
- (
-
- 'apiDoc' => true,
-
- 'apiLog' => true,
-
- 'apiOpenPath' => 'src',
-
- 'apiConfig' => false,
- );
- if (isset($dc['data'])) {
- $config['base']['data'] = $dc['data'];
- }
- $create = false;
- if (isset($dc['mysql']['create'])) {
- $create = false;
- }
- $create = -1;
- $ip = isset($dc['host']) ? $dc['host'] : '192.168.33.10';
- $local = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $ip;
- $config['database'] = array
- (
-
- 'opt' => true,
-
-
- 'create' => $create,
-
- 'default' => array
- (
- 'type' => 'pdo',
- 'host' => array
- (
- 'read' => isset($dc['mysql']) ? $dc['mysql']['host'] : 'web-mysql:3306',
- 'update' => isset($dc['mysql']) ? $dc['mysql']['host'] : 'web-mysql:3306',
- 'create' => isset($dc['mysql']) ? $dc['mysql']['host_create'] : 'web-mysql:3306',
- ),
- 'database' => 'churen',
- 'username' => isset($dc['mysql']) ? $dc['mysql']['username'] : 'root',
- 'password' => isset($dc['mysql']) ? $dc['mysql']['password'] : '123456',
- 'charset' => 'utf8mb4',
- ),
-
- 'old' => array
- (
- 'type' => 'pdo',
- 'host' => array
- (
- 'read' => isset($dc['mysql']) ? $dc['mysql']['host'] : 'web-mysql:3306',
- 'update' => isset($dc['mysql']) ? $dc['mysql']['host'] : 'web-mysql:3306',
- 'create' => isset($dc['mysql']) ? $dc['mysql']['host_create'] : 'web-mysql:3306',
- ),
- 'database' => 'chuzren1yi9liao',
- 'username' => isset($dc['mysql']) ? $dc['mysql']['username'] : 'root',
- 'password' => isset($dc['mysql']) ? $dc['mysql']['password'] : '123456',
- 'charset' => 'utf8mb4',
- ),
- );
- $config['cache'] = array
- (
-
- 'mysql' => 0,
-
- 'html' => 0,
-
- 'data' => 0,
-
- 'load' => 0,
-
- 'curl' => 0,
-
- 'route' => 0,
-
- 'routeKey' => array
- (
-
- ),
-
- 'routeNoParam' => array
- (
- 'uid' => array
- (
-
- ),
- ),
-
-
- 'shell' => 'clearcache',
-
- 'expire' => true,
-
- 'type' => 'redis',
-
- 'store' => array
- (
- array
- (
- 'host' => 'server-redis',
- 'port' => '6379',
- 'weight' => 100,
- 'password' => 'dm_redis_123',
- ),
- ),
- );
- $config['debug'] = array
- (
- 'log' => false
- );
- $host = 'http://'.$local . '/';
- $name = '';
- if (isset($dc['mysql'])) {
- $name = '';
- }
- $upload = $host . $name . 'package/';
- $uploadcdn = $host . $name . 'data/';
- $config['host'] = array
- (
- 'upload'=> $upload . 'upload/?save',
- 'uploadRes' => isset($dc['res']) && $dc['res'] ? $dc['res'] : $uploadcdn . 'upload/',
-
- 'project' => array
- (
- 'uploads' => array
- (
- 'path' => $host. 'churen/package/upload/?',
- ),
- ),
- );
- return $config;
|