Skip to content

Commit

Permalink
config update
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinecraft committed Dec 12, 2024
1 parent c09fac4 commit c29b70f
Show file tree
Hide file tree
Showing 11 changed files with 167 additions and 51 deletions.
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ APP_THEME=default
# Pulse dashboard for health monitoring
PULSE_ENABLED=false

APP_MAINTENANCE_DRIVER=file
PHP_CLI_SERVER_WORKERS=4
BCRYPT_ROUNDS=12

# Dont enable on production
APP_DEBUG=false
DEBUGBAR_ENABLED=false
Expand All @@ -21,7 +25,7 @@ APP_URL=http://localhost
# Database,redis,smtp etc config is moved at last inorder to prevent accential leak during screenshare

# Laravel Drivers
CACHE_DRIVER=redis
CACHE_STORE=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=database
SESSION_LIFETIME=120
Expand Down
12 changes: 9 additions & 3 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
|
*/

'version' => '6.3.0',
'version' => '7.0.0',

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -162,6 +162,12 @@

'cipher' => 'AES-256-CBC',

'previous_keys' => [
...array_filter(
explode(',', env('APP_PREVIOUS_KEYS', ''))
),
],

/*
|--------------------------------------------------------------------------
| Maintenance Mode Driver
Expand All @@ -176,8 +182,8 @@
*/

'maintenance' => [
'driver' => 'file',
// 'store' => 'redis',
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],

/*
Expand Down
8 changes: 4 additions & 4 deletions config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/

'defaults' => [
'guard' => 'web',
'passwords' => 'users',
'guard' => env('AUTH_GUARD', 'web'),
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
],

/*
Expand Down Expand Up @@ -100,7 +100,7 @@
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
'expire' => 60,
'throttle' => 60,
],
Expand All @@ -117,7 +117,7 @@
|
*/

'password_timeout' => 10800,
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),

/*
|--------------------------------------------------------------------------
Expand Down
14 changes: 8 additions & 6 deletions config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
|
*/

'default' => env('CACHE_DRIVER', 'file'),
'default' => env('CACHE_STORE', 'redis'),

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -44,14 +44,16 @@

'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
'lock_connection' => null,
'connection' => env('DB_CACHE_CONNECTION'),
'table' => env('DB_CACHE_TABLE', 'cache'),
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
],

'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
'lock_path' => storage_path('framework/cache/data'),
],

'memcached' => [
Expand All @@ -75,8 +77,8 @@

'redis' => [
'driver' => 'redis',
'connection' => 'cache',
'lock_connection' => 'default',
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
],

'dynamodb' => [
Expand Down
48 changes: 35 additions & 13 deletions config/database.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Illuminate\Database\DBAL\TimestampType;
use Illuminate\Support\Str;

return [
Expand Down Expand Up @@ -38,23 +37,49 @@

'sqlite' => [
'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'url' => env('DB_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
'busy_timeout' => null,
'journal_mode' => null,
'synchronous' => null,
],

'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'minetrax'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
'dump' => [
'timeout' => 60 * 30, // 30 minute timeout
],
],

'mariadb' => [
'driver' => 'mariadb',
'url' => env('DB_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'minetrax'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'charset' => env('DB_CHARSET', 'utf8mb4'),
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
Expand Down Expand Up @@ -110,7 +135,10 @@
|
*/

'migrations' => 'migrations',
'migrations' => [
'table' => 'migrations',
'update_date_on_publish' => true,
],

/*
|--------------------------------------------------------------------------
Expand All @@ -129,7 +157,7 @@

'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
],

'default' => [
Expand All @@ -151,10 +179,4 @@
],

],

'dbal' => [
'types' => [
'timestamp' => TimestampType::class,
],
],
];
21 changes: 17 additions & 4 deletions config/hashing.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
*/

'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
'rounds' => env('BCRYPT_ROUNDS', 12),
'verify' => env('HASH_VERIFY', true),
],

/*
Expand All @@ -44,9 +45,21 @@
*/

'argon' => [
'memory' => 65536,
'threads' => 1,
'time' => 4,
'memory' => env('ARGON_MEMORY', 65536),
'threads' => env('ARGON_THREADS', 1),
'time' => env('ARGON_TIME', 4),
'verify' => env('HASH_VERIFY', true),
],

/*
|--------------------------------------------------------------------------
| Rehash On Login
|--------------------------------------------------------------------------
|
| Setting this option to true will tell Laravel to automatically rehash
| the user's password during login if the configured work factor for
| the algorithm has changed, allowing graceful upgrades of hashes.
|
*/
'rehash_on_login' => true,
];
13 changes: 11 additions & 2 deletions config/logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Processor\PsrLogMessageProcessor;

return [

Expand Down Expand Up @@ -32,7 +33,7 @@

'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => false,
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
],

/*
Expand Down Expand Up @@ -61,12 +62,14 @@
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],

'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
'days' => 14,
],

Expand All @@ -76,6 +79,7 @@
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'),
'replace_placeholders' => true,
],

'papertrail' => [
Expand All @@ -85,8 +89,9 @@
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],

'stderr' => [
Expand All @@ -97,16 +102,20 @@
'with' => [
'stream' => 'php://stderr',
],
'processors' => [PsrLogMessageProcessor::class],
],

'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
'replace_placeholders' => true,
],

'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],

'null' => [
Expand Down
35 changes: 26 additions & 9 deletions config/queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,18 @@

'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
'connection' => env('DB_QUEUE_CONNECTION'),
'table' => env('DB_QUEUE_TABLE', 'jobs'),
'queue' => env('DB_QUEUE', 'default'),
'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
'after_commit' => false,
],

'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
'queue' => env('BEANSTALKD_QUEUE', 'default'),
'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
'block_for' => 0,
'after_commit' => false,
],
Expand All @@ -64,16 +65,16 @@

'redis' => [
'driver' => 'redis',
'connection' => 'default',
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
'block_for' => null,
'after_commit' => false,
],

'redis-longtask' => [
'driver' => 'redis',
'connection' => 'default',
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
'queue' => 'longtask',
'retry_after' => 3660, // 1 hour + 1 min
'block_for' => null,
Expand All @@ -82,6 +83,22 @@

],

/*
|--------------------------------------------------------------------------
| Job Batching
|--------------------------------------------------------------------------
|
| The following options configure the database and table that store job
| batching information. These options can be updated to any database
| connection and table which has been defined by your application.
|
*/

'batching' => [
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'job_batches',
],

/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
Expand Down
Loading

0 comments on commit c29b70f

Please sign in to comment.