mirror of
https://gh.wpcy.net/https://github.com/aspirepress/AspireCloud.git
synced 2026-05-31 00:04:27 +08:00
* fix: switch redis driver to predis because laravel is hopeless * chore: add spatie/laravel-permission * build: composer update and bump * style: death to captain obvious (zap laravel's banner comments) * feat: initial roles and perms * chore: assign User role on User created * refactor: rename 'aspire_press' config key to 'aspirecloud' * feat: require json content-type on admin api routes * chore: implement BulkImport endpoint * chore: give RepoAdmin users BulkImport permissions * docs: update README
70 lines
2.3 KiB
PHP
70 lines
2.3 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Str;
|
|
|
|
return [
|
|
'default' => env('DB_CONNECTION', 'sqlite'),
|
|
|
|
'connections' => [
|
|
'pgsql' => [
|
|
'driver' => 'pgsql',
|
|
'url' => env('DB_URL'),
|
|
'host' => env('DB_HOST', 'postgres'),
|
|
'port' => env('DB_PORT', '5432'),
|
|
'database' => env('DB_DATABASE', 'aspirecloud'),
|
|
'username' => env('DB_USERNAME', 'root'),
|
|
'password' => env('DB_PASSWORD', 'password'),
|
|
'charset' => env('DB_CHARSET', 'utf8'),
|
|
'prefix' => '',
|
|
'prefix_indexes' => true,
|
|
'search_path' => 'public',
|
|
'sslmode' => env('DB_SSLMODE', 'disable'),
|
|
],
|
|
'test' => [
|
|
'driver' => 'pgsql',
|
|
'url' => env('DB_URL'),
|
|
'host' => env('DB_HOST', 'postgres'),
|
|
'port' => env('DB_PORT', '5432'),
|
|
'database' => env('DB_TEST_DATABASE', 'aspirecloud_testing'),
|
|
'username' => env('DB_USERNAME', 'postgres'),
|
|
'password' => env('DB_PASSWORD', 'password'),
|
|
'charset' => env('DB_CHARSET', 'utf8'),
|
|
'prefix' => '',
|
|
'prefix_indexes' => true,
|
|
'search_path' => 'public',
|
|
'sslmode' => env('DB_SSLMODE', 'disable'),
|
|
],
|
|
],
|
|
|
|
'migrations' => [
|
|
'table' => 'migrations',
|
|
'update_date_on_publish' => true,
|
|
],
|
|
|
|
'redis' => [
|
|
'client' => env('REDIS_CLIENT', 'predis'),
|
|
|
|
'options' => [
|
|
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
|
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
|
|
],
|
|
|
|
'default' => [
|
|
'url' => env('REDIS_URL'),
|
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
|
'username' => env('REDIS_USERNAME'),
|
|
'password' => env('REDIS_PASSWORD'),
|
|
'port' => env('REDIS_PORT', '6379'),
|
|
'database' => env('REDIS_DB', '0'),
|
|
],
|
|
|
|
'cache' => [
|
|
'url' => env('REDIS_URL'),
|
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
|
'username' => env('REDIS_USERNAME'),
|
|
'password' => env('REDIS_PASSWORD'),
|
|
'port' => env('REDIS_PORT', '6379'),
|
|
'database' => env('REDIS_CACHE_DB', '1'),
|
|
],
|
|
],
|
|
];
|