Skip to content

Commit 3c518cc

Browse files
committed
Config updates
1 parent 67d2cdb commit 3c518cc

File tree

4 files changed

+30
-14
lines changed

4 files changed

+30
-14
lines changed

app/Core/Application.php

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public function __construct($basePath = null)
6161
$this->usePublicPath($this->basePath.'/public');
6262
$this->useStoragePath($this->basePath.'/storage');
6363
$this->useLangPath($this->basePath.'/app/Language');
64+
$this->useDatabasePath($this->basePath.'/database');
6465

6566
$this->registerBaseBindings();
6667

app/Core/Configuration/DefaultConfig.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class DefaultConfig
9595
/**
9696
* @var string Log Path
9797
*/
98-
public string $logPath = APP_ROOT.'/logs/error.log';
98+
public string $logPath = APP_ROOT.'/storage/logs/error.log';
9999

100100
/**
101101
* @var bool Whether or not to enable the Poor Man's Cron fallback

app/Core/Configuration/laravelConfig.php

+24-13
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@
5050
\Leantime\Core\Providers\TemplateServiceProvider::class,
5151

5252
],
53+
'name' => env('LEAN_SITENAME', 'Leantime'),
54+
'locale' => env('LEAN_LANGUAGE', 'en-US'),
55+
'url' => env('LEAN_APP_URL', ''),
56+
'timezone' => env('LEAN_DEFAULT_TIMEZONE', 'America/Los_Angeles'),
57+
'env' => env('LEAN_ENV', ''),
58+
'debug' => env('LEAN_DEBUG', 0),
59+
'key' => env('LEAN_SESSION_PASSWORD', '123'),
60+
5361
],
5462
'debug_blacklist' => [
5563
'_ENV' => [
@@ -325,7 +333,7 @@
325333
|
326334
*/
327335

328-
'secure' => false,
336+
'secure' => env('LEAN_SESSION_SECURE', false),
329337

330338
/*
331339
|--------------------------------------------------------------------------
@@ -396,17 +404,17 @@
396404
'compression' => 3, // Redis::COMPRESSION_LZ4
397405
],
398406
'default' => [
399-
'url' => '',
400-
'scheme' => 'tls',
401-
'host' => '',
402-
'password' => null,
403-
'port' => '6379',
407+
'url' => env('LEAN_REDIS_URL', ''),
408+
'scheme' => env('LEAN_REDIS_SCHEME', 'tls'),
409+
'host' => env('LEAN_REDIS_HOST', '127.0.0.1'),
410+
'password' => env('LEAN_REDIS_PASSWORD', null),
411+
'port' => env('LEAN_REDIS_PORT', '127.0.0.1'),
404412
'database' => '0',
405413
'prefix' => 'leantime_cache',
406414
],
407415
],
408416
'database' => [
409-
'default' => env('DB_CONNECTION', 'mysql'),
417+
'default' => env('LEAN_DB_DEFAULT_CONNECTION', 'mysql'),
410418
/*
411419
|--------------------------------------------------------------------------
412420
| Database Connections
@@ -421,9 +429,9 @@
421429
'sqlite' => [
422430
'driver' => 'sqlite',
423431
'url' => env('LEAN_DB_URL'),
424-
'database' => env('LEAN_DB_DATABASE', database_path('database.sqlite')),
432+
'database' => database_path('database.sqlite'),
425433
'prefix' => '',
426-
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
434+
'foreign_key_constraints' => env('LEAN_DB_FOREIGN_KEYS', true),
427435
'busy_timeout' => null,
428436
'journal_mode' => null,
429437
'synchronous' => null,
@@ -437,17 +445,20 @@
437445
'username' => env('LEAN_DB_USER', 'root'),
438446
'password' => env('LEAN_DB_PASSWORD', ''),
439447
'unix_socket' => env('LEAN_DB_SOCKET', ''),
440-
'charset' => env('DB_CHARSET', 'utf8mb4'),
441-
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
448+
'charset' => env('LEAN_DB_CHARSET', 'utf8mb4'),
449+
'collation' => env('LEAN_DB_COLLATION', 'utf8mb4_unicode_ci'),
442450
'prefix' => '',
443451
'prefix_indexes' => true,
444452
'strict' => false,
445453
'engine' => 'InnoDB',
454+
'sslmode' => env('LEAN_DB_SSLMODE', ''),
446455
'options' => extension_loaded('pdo_mysql') ? array_filter([
447-
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
456+
PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => env('LEAN_DB_MYSQL_ATTR_SSL_VERIFY_SERVER', false),
457+
PDO::MYSQL_ATTR_SSL_KEY => env('LEAN_DB_MYSQL_ATTR_SSL_KEY'),
458+
PDO::MYSQL_ATTR_SSL_CERT => env('LEAN_DB_MYSQL_ATTR_SSL_CERT'),
459+
PDO::MYSQL_ATTR_SSL_CA => env('LEAN_DB_MYSQL_ATTR_SSL_CA'),
448460
PDO::ATTR_EMULATE_PREPARES => true,
449461
]) : [],
450-
451462
],
452463
],
453464
],

database/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except this file
4+
!.gitignore

0 commit comments

Comments
 (0)