chore: update .env.example

This commit is contained in:
Phan An 2022-11-30 10:22:52 +01:00
parent 247e6fdef9
commit 6e86081638
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC
2 changed files with 70 additions and 33 deletions

View file

@ -1,4 +1,10 @@
APP_NAME=Koel APP_NAME=Koel
APP_ENV=production
APP_DEBUG=true
APP_URL=http://localhost:8000
# A random 32-char string. You can leave this empty if use php artisan koel:init.
APP_KEY=
# Database connection name, which corresponds to the database driver. # Database connection name, which corresponds to the database driver.
# Possible values are: # Possible values are:
@ -8,14 +14,22 @@ APP_NAME=Koel
# sqlite-persistent (Local sqlite file) # sqlite-persistent (Local sqlite file)
# IMPORTANT: This value must present for `artisan koel:init` command to work. # IMPORTANT: This value must present for `artisan koel:init` command to work.
DB_CONNECTION=mysql DB_CONNECTION=mysql
DB_HOST=127.0.0.1 DB_HOST=127.0.0.1
DB_PORT=3306 DB_PORT=3306
DB_DATABASE=koel DB_DATABASE=koel
DB_USERNAME=koel DB_USERNAME=koel
DB_PASSWORD= DB_PASSWORD=
# A random 32-char string. You can leave this empty if use php artisan koel:init.
APP_KEY= # Some providers (e.g. Heroku) provide a "database URL" instead separated config values, which
# you can use here instead.
DATABASE_URL=
# The absolute path to the root CA bundle if you're connecting to the MySQL database via SSL.
MYSQL_ATTR_SSL_CA=
# The ABSOLUTE path to your media. This value can always be changed later via the web interface. # The ABSOLUTE path to your media. This value can always be changed later via the web interface.
MEDIA_PATH= MEDIA_PATH=
@ -26,10 +40,6 @@ MEDIA_PATH=
# set the following setting to false. # set the following setting to false.
IGNORE_DOT_FILES=true IGNORE_DOT_FILES=true
APP_ENV=production
APP_DEBUG=true
APP_URL=http://localhost:8000
# The maximum scan time, in seconds. Increase this if you have a huge library. # The maximum scan time, in seconds. Increase this if you have a huge library.
# Note: This setting doesn't have effect when scanning via koel:sync. # Note: This setting doesn't have effect when scanning via koel:sync.
@ -96,7 +106,7 @@ YOUTUBE_API_KEY=
# You can also configure Koel to use a CDN to serve the media files. # You can also configure Koel to use a CDN to serve the media files.
# This url must be mapped to the home URL of your Koel's installation. # This url must be mapped to the home URL of your Koel's installation.
# No trailing slash, please. # No trailing slash.
CDN_URL= CDN_URL=
@ -130,6 +140,15 @@ PUSHER_APP_KEY=
PUSHER_APP_SECRET= PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER= PUSHER_APP_CLUSTER=
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
SQS_PUBLIC_KEY= SQS_PUBLIC_KEY=
SQS_SECRET_KEY= SQS_SECRET_KEY=
SQS_QUEUE_PREFIX= SQS_QUEUE_PREFIX=
@ -138,15 +157,9 @@ SQS_QUEUE_REGION=
# The variables below are Laravel-specific. # The variables below are Laravel-specific.
# You can change them if you know what you're doing. Otherwise, just leave them as-is. # You can change them if you know what you're doing. Otherwise, just leave them as-is.
APP_LOG_LEVEL=debug
BROADCAST_DRIVER=log BROADCAST_DRIVER=log
CACHE_DRIVER=file CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file SESSION_DRIVER=file
QUEUE_DRIVER=sync SESSION_LIFETIME=120
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

View file

@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Str;
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -51,27 +53,37 @@ return [
'mysql' => [ 'mysql' => [
'driver' => 'mysql', 'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'), 'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', 3306), 'port' => env('DB_PORT', 3306),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'), 'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''), 'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4', 'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci', 'collation' => 'utf8mb4_unicode_ci',
'prefix' => '', 'prefix' => '',
'strict' => false, 'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
], ],
'pgsql' => [ 'pgsql' => [
'driver' => 'pgsql', 'driver' => 'pgsql',
'host' => env('DB_HOST', 'localhost'), 'url' => env('DATABASE_URL'),
'port' => env('DB_PORT', 5432), 'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'), 'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''), 'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8', 'charset' => 'utf8',
'prefix' => '', 'prefix' => '',
'schema' => 'public', 'prefix_indexes' => true,
'search_path' => 'public',
'sslmode' => 'prefer',
], ],
'pgsql-ci' => [ 'pgsql-ci' => [
@ -88,13 +100,15 @@ return [
'sqlsrv' => [ 'sqlsrv' => [
'driver' => 'sqlsrv', 'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'), 'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', 1433), 'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'), 'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''), 'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8', 'charset' => 'utf8',
'prefix' => '', 'prefix' => '',
'prefix_indexes' => true,
], ],
], ],
@ -123,21 +137,31 @@ return [
*/ */
'redis' => [ 'redis' => [
'client' => 'predis',
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [ 'options' => [
'cluster' => 'redis', 'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'koel'), '_') . '_database_'),
], ],
'clusters' => [
'default' => [ 'default' => [
[ 'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null), 'username' => env('REDIS_USERNAME'),
'port' => env('REDIS_PORT', 6379), 'password' => env('REDIS_PASSWORD'),
'database' => env('REDIS_DATABASE', 0), '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'),
], ],
], ],
]; ];