docker-webman-jsonrpc/config/database.php

51 lines
1.8 KiB
PHP

<?php
/**
* This file is part of webman.
*
* Licensed under The MIT License
* For full copyright and license information, please see the MIT-LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @author walkor<walkor@workerman.net>
* @copyright walkor<walkor@workerman.net>
* @link http://www.workerman.net/
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
return [
'default' => env('DB_DEFAULT_DRIVER', 'mysql'),
'connections' => [
'mysql' => [
'driver' => 'mysql',
'host' => env('MYSQL_HOST', '127.0.0.1'),
'port' => env('MYSQL_PORT', 3306),
'database' => env('MYSQL_DATABASE', 'webman'),
'username' => env('MYSQL_USERNAME', 'webman'),
'password' => env('MYSQL_PASSWORD', ''),
'unix_socket' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
'sqlite' => [
'driver' => 'sqlite',
'database' => eval("return " . env('SQLITE_DATABASE', '') . ";"),
'prefix' => env('SQLITE_PREFIX', ''),
],
'pgsql' => [
'driver' => 'pgsql',
'host' => env('PG_HOST', '127.0.0.1'),
'port' => env('PG_PORT', 5432),
'database' => env('PG_DATABASE', 'webman'),
'username' => env('PG_USERNAME', 'webman'),
'password' => env('PG_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => env('PG_SCHEMA', 'public'),
'sslmode' => 'prefer',
],
]
];