123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <?php
- $dc = array();
- $dc_file = '/share/dc/config.php';
- if (is_file($dc_file)) {
- $dc = include($dc_file);
- }
- if (isset($dc['php'])) {
- $config['base']['php'] = $dc['php'];
- }
- if (isset($dc['data'])) {
- $config['base']['data'] = $dc['data'];
- }
- $create = false;
- if (isset($dc['mysql']['create'])) {
- $create = $dc['mysql']['create'];
- }
- $create = -1;
- $ip = isset($dc['host']) ? $dc['host'] : '192.168.33.10';
- $local = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $ip;
- $config['database'] = array
- (
- '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' => 'info',
- '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' => 1800,
-
- 'load' => 0,
-
- 'curl' => 0,
-
- 'route' => 1800,
-
- 'routeKey' => array
- (
-
- ),
-
- 'routeNoParam' => array
- (
-
- ),
-
-
- 'shell' => 'clearcache',
-
- 'expire' => true,
-
- 'type' => 'redis',
-
- 'store' => array
- (
-
- ),
- );
- $config['debug'] = array
- (
- 'log' => array('type' => 'file')
- );
- $host = 'http://'.$local . '/';
- $upload = $host . 'info/package/';
- $uploadcdn = $host . 'info/data/';
- $config['host'] = array
- (
- 'upload'=> $upload . 'upload/?save',
- 'uploadRes' => isset($dc['res']) && $dc['res'] ? $dc['res'] : $uploadcdn . 'upload/',
- 'project' => array
- (
-
- 'uploads' => array
- (
- 'path' => $host. 'upload/upload/?',
- ),
- ),
- );
- return $config;
|