From 7c39c004004e77aca4e547e24c8ef56449cd7dc7 Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Tue, 19 Mar 2024 17:03:01 -0400 Subject: [PATCH] Update env vars --- .env.example | 6 ++- .github/docker/README.md | 44 +++++++++---------- .../Environment/AppSettingsCommand.php | 2 +- config/database.php | 2 +- phpunit.xml | 2 +- 5 files changed, 30 insertions(+), 26 deletions(-) diff --git a/.env.example b/.env.example index 5887b4f8b..c979b4e52 100644 --- a/.env.example +++ b/.env.example @@ -7,6 +7,7 @@ APP_LOCALE=en APP_ENVIRONMENT_ONLY=true LOG_CHANNEL=daily +LOG_STACK=single LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug @@ -21,7 +22,7 @@ REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 -CACHE_DRIVER=file +CACHE_STORE=file QUEUE_CONNECTION=redis SESSION_DRIVER=file @@ -38,3 +39,6 @@ MAIL_FROM_ADDRESS=no-reply@example.com MAIL_FROM_NAME="Panel Administrator" # Set this to your domain to prevent it defaulting to 'localhost', causing mail servers such as Gmail to reject your mail # MAIL_EHLO_DOMAIN=panel.example.com +SESSION_ENCRYPT=false +SESSION_PATH=/ +SESSION_DOMAIN=null diff --git a/.github/docker/README.md b/.github/docker/README.md index 148773f40..77f79291f 100644 --- a/.github/docker/README.md +++ b/.github/docker/README.md @@ -29,28 +29,28 @@ There are multiple environment variables to configure the panel when not providi Note: If your `APP_URL` starts with `https://` you need to provide an `LE_EMAIL` as well so Certificates can be generated. -| Variable | Description | Required | -| ------------------- | ------------------------------------------------------------------------------ | -------- | -| `APP_URL` | The URL the panel will be reachable with (including protocol) | yes | -| `APP_TIMEZONE` | The timezone to use for the panel | yes | -| `LE_EMAIL` | The email used for letsencrypt certificate generation | yes | -| `DB_HOST` | The host of the mysql instance | yes | -| `DB_PORT` | The port of the mysql instance | yes | -| `DB_DATABASE` | The name of the mysql database | yes | -| `DB_USERNAME` | The mysql user | yes | -| `DB_PASSWORD` | The mysql password for the specified user | yes | -| `CACHE_DRIVER` | The cache driver (see [Cache drivers](#cache-drivers) for detais) | yes | -| `SESSION_DRIVER` | | yes | -| `QUEUE_DRIVER` | | yes | -| `REDIS_HOST` | The hostname or IP address of the redis database | yes | -| `REDIS_PASSWORD` | The password used to secure the redis database | maybe | -| `REDIS_PORT` | The port the redis database is using on the host | maybe | -| `MAIL_DRIVER` | The email driver (see [Mail drivers](#mail-drivers) for details) | yes | -| `MAIL_FROM` | The email that should be used as the sender email | yes | -| `MAIL_HOST` | The host of your mail driver instance | maybe | -| `MAIL_PORT` | The port of your mail driver instance | maybe | -| `MAIL_USERNAME` | The username for your mail driver | maybe | -| `MAIL_PASSWORD` | The password for your mail driver | maybe | +| Variable | Description | Required | +|-------------------| ------------------------------------------------------------------------------ | -------- | +| `APP_URL` | The URL the panel will be reachable with (including protocol) | yes | +| `APP_TIMEZONE` | The timezone to use for the panel | yes | +| `LE_EMAIL` | The email used for letsencrypt certificate generation | yes | +| `DB_HOST` | The host of the mysql instance | yes | +| `DB_PORT` | The port of the mysql instance | yes | +| `DB_DATABASE` | The name of the mysql database | yes | +| `DB_USERNAME` | The mysql user | yes | +| `DB_PASSWORD` | The mysql password for the specified user | yes | +| `CACHE_STORE` | The cache driver (see [Cache drivers](#cache-drivers) for detais) | yes | +| `SESSION_DRIVER` | | yes | +| `QUEUE_DRIVER` | | yes | +| `REDIS_HOST` | The hostname or IP address of the redis database | yes | +| `REDIS_PASSWORD` | The password used to secure the redis database | maybe | +| `REDIS_PORT` | The port the redis database is using on the host | maybe | +| `MAIL_DRIVER` | The email driver (see [Mail drivers](#mail-drivers) for details) | yes | +| `MAIL_FROM` | The email that should be used as the sender email | yes | +| `MAIL_HOST` | The host of your mail driver instance | maybe | +| `MAIL_PORT` | The port of your mail driver instance | maybe | +| `MAIL_USERNAME` | The username for your mail driver | maybe | +| `MAIL_PASSWORD` | The password for your mail driver | maybe | ### Cache drivers diff --git a/app/Console/Commands/Environment/AppSettingsCommand.php b/app/Console/Commands/Environment/AppSettingsCommand.php index 1c667ebd6..343130168 100644 --- a/app/Console/Commands/Environment/AppSettingsCommand.php +++ b/app/Console/Commands/Environment/AppSettingsCommand.php @@ -92,7 +92,7 @@ class AppSettingsCommand extends Command ); $selected = config('cache.default', 'redis'); - $this->variables['CACHE_DRIVER'] = $this->option('cache') ?? $this->choice( + $this->variables['CACHE_STORE'] = $this->option('cache') ?? $this->choice( 'Cache Driver', self::CACHE_DRIVERS, array_key_exists($selected, self::CACHE_DRIVERS) ? $selected : null diff --git a/config/database.php b/config/database.php index c22664a76..8bf2f6812 100644 --- a/config/database.php +++ b/config/database.php @@ -8,7 +8,7 @@ return [ 'connections' => [ 'mysql' => [ 'driver' => 'mysql', - 'url' => env('DATABASE_URL'), + 'url' => env('DB_URL', env('DATABASE_URL')), 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'panel'), diff --git a/phpunit.xml b/phpunit.xml index f3e95082b..c38a0f695 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -22,7 +22,7 @@ - +