Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve config options #1366

Merged
merged 24 commits into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fd71ede
Update and improve some configs
qwerty287 Jun 11, 2022
0281839
Improve some defaults
qwerty287 Jun 11, 2022
55a0977
Merge branch 'master' into rework-configs
qwerty287 Jun 11, 2022
3771d88
Suggest `phpredis` ext
qwerty287 Jun 11, 2022
7cca708
Restore db cache driver
qwerty287 Jun 11, 2022
8c0e4de
Update example env
qwerty287 Jun 11, 2022
8c8b181
Clean up gitignore
qwerty287 Jun 11, 2022
fdd1521
Add DB options back
qwerty287 Jun 12, 2022
b59537f
Remove composer suggestion
qwerty287 Jun 12, 2022
40c1f79
Add debugbar comments back
qwerty287 Jun 12, 2022
00e41d2
Update composer name and add support opts
qwerty287 Jun 12, 2022
07771f8
Use spaces instead of tabs for composer.json
qwerty287 Jun 12, 2022
be71c61
Update keywords
qwerty287 Jun 13, 2022
7bf1ad6
Update copyright year
qwerty287 Jun 13, 2022
c6cec23
Merge remote-tracking branch 'origin/master' into rework-configs
qwerty287 Jun 29, 2022
fd3d053
Set `null` as value
qwerty287 Jul 3, 2022
3c6878b
Merge branch 'master' into rework-configs
qwerty287 Jul 18, 2022
4c82360
Merge remote-tracking branch 'origin/master' into rework-configs
qwerty287 Aug 2, 2022
cca95af
Merge remote-tracking branch 'origin/master' into rework-configs
qwerty287 Aug 25, 2022
cbeeda0
Reset frontend
qwerty287 Aug 25, 2022
5853686
Add opt back that's required for tests
qwerty287 Aug 25, 2022
bd1c7ab
Revert session option
qwerty287 Aug 30, 2022
6b53e91
Merge remote-tracking branch 'origin/master' into rework-configs
qwerty287 Aug 30, 2022
3b26ba0
use `lychee-org`
qwerty287 Sep 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ APP_URL=http://localhost
# enable or disable debug bar. By default it is disabled.
DEBUGBAR_ENABLED=false

LOG_CHANNEL=stack

##############################################################################
# IMPORTANT: To migrate from Lychee v3 you *MUST* use the same MySQL/MariaDB #
# server as v3. #
Expand Down Expand Up @@ -60,18 +58,14 @@ DB_LOG_SQL=false
# LYCHEE_IMAGE_VISIBILITY=public

# folders in which the files will be stored
# LYCHEE_DIST="/var/www/html/Lychee-Laravel/public/dist/"
# LYCHEE_UPLOADS="/var/www/html/Lychee-Laravel/public/uploads/"

# url to access those files
# LYCHEE_DIST_URL="dist/"
# LYCHEE_UPLOADS_URL="uploads/"

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync

SECURITY_HEADER_HSTS_ENABLE=false
SESSION_SECURE_COOKIE=false
Expand All @@ -89,14 +83,6 @@ MAIL_ENCRYPTION=
MAIL_FROM_NAME=
MAIL_FROM_ADDRESS=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

# The trusted proxies if Lychee is behind a reverse proxy
# Accepted values:
# - `null`: no proxy
Expand Down
12 changes: 0 additions & 12 deletions .env.homestead
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,14 @@ DB_OLD_LYCHEE_PREFIX=
TIMEZONE=UTC

# folders in which the files will be stored
# LYCHEE_DIST="/var/www/html/Lychee-Laravel/public/dist/"
# LYCHEE_UPLOADS="/var/www/html/Lychee-Laravel/public/uploads/"

# url to access those files
# LYCHEE_DIST_URL="dist/"
# LYCHEE_UPLOADS_URL="uploads/"

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync

SECURITY_HEADER_HSTS_ENABLE=false

Expand All @@ -47,14 +43,6 @@ MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

# The trusted proxies if Lychee is behind a reverse proxy
# Accepted values:
# - `null`: no proxy
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)

Copyright (c) 2017-2018 Tobias Reich
Copyright (c) 2018-2020 LycheeOrg
Copyright (c) 2018-2022 LycheeOrg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 13 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
{
"name": "lycheeorg/lychee-laravel",
"name": "lychee-org/lychee",
"description": "A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.",
"homepage": "https://lycheeorg.github.io/",
"readme": "readme.md",
"support": {
"source": "https://github.com/LycheeOrg/Lychee",
"issues": "https://github.com/LycheeOrg/Lychee/issues",
"docs": "https://lycheeorg.github.io/docs/",
"chat": "https://gitter.im/LycheeOrg/Lobby"
},
"keywords": [
"framework",
"laravel"
"photos",
"gallery",
"photo management",
"album software",
"image organizer"
],
"repositories": [
{
Expand Down
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

'url' => env('APP_URL', 'http://localhost'),

'asset_url' => env('ASSET_URL'),
'asset_url' => null,

/*
|--------------------------------------------------------------------------
Expand Down
7 changes: 2 additions & 5 deletions config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
'connection' => env('DB_CONNECTION'),
],

'file' => [
Expand All @@ -58,9 +58,6 @@
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
Expand Down Expand Up @@ -98,6 +95,6 @@

'prefix' => env(
'CACHE_PREFIX',
Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'
Str::slug(env('APP_NAME', 'Lychee'), '_') . '_cache'
qwerty287 marked this conversation as resolved.
Show resolved Hide resolved
),
];
6 changes: 3 additions & 3 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
qwerty287 marked this conversation as resolved.
Show resolved Hide resolved
'foreign_key_constraints' => true,
],

'mysql' => [
Expand Down Expand Up @@ -162,11 +162,11 @@
*/

'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'client' => 'phpredis',

'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', 'Lychee'), '_') . '_database_'),
qwerty287 marked this conversation as resolved.
Show resolved Hide resolved
],

'default' => [
Expand Down
18 changes: 9 additions & 9 deletions config/debugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,26 +135,26 @@

'options' => [
'auth' => [
'show_name' => true, // Also show the users name/email in the debugbar
'show_name' => true, // Also show the users name/email in the debugbar
],
'db' => [
'with_params' => true, // Render SQL with the parameters substituted
'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
'timeline' => false, // Add the queries to the timeline
'explain' => [ // Show EXPLAIN output on queries
'with_params' => true, // Render SQL with the parameters substituted
'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
'timeline' => false, // Add the queries to the timeline
'explain' => [ // Show EXPLAIN output on queries
'enabled' => false,
'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
'types' => ['SELECT'], // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
],
'hints' => true, // Show hints for common mistakes
'hints' => true, // Show hints for common mistakes
],
'mail' => [
'full_log' => false,
],
'views' => [
'data' => false, //Note: Can slow down the application, because the data can be quite large..
'data' => false, // Note: Can slow down the application, because the data can be quite large..
],
'route' => [
'label' => true, // show complete route on bar
'label' => true, // show complete route on bar
],
'logs' => [
'file' => null,
Expand Down
23 changes: 4 additions & 19 deletions config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
|
*/

'default' => env('FILESYSTEM_DRIVER', 'images'),
'default' => 'images',

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -69,7 +69,7 @@
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
qwerty287 marked this conversation as resolved.
Show resolved Hide resolved
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
Expand All @@ -80,8 +80,8 @@
// TODO: Maybe we should drop this Flysystem disk, because neither the driver nor the root must be changed and hence the whole point of using the Flysystem abstraction is gone.
'dist' => [
qwerty287 marked this conversation as resolved.
Show resolved Hide resolved
'driver' => 'local',
'root' => env('LYCHEE_DIST', public_path('dist/')),
'url' => env('LYCHEE_DIST_URL', 'dist/'),
'root' => public_path('dist/'),
'url' => 'dist/',
'visibility' => 'public',
],

Expand All @@ -97,19 +97,4 @@
'visibility' => 'public',
],
],

/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/

'links' => [
public_path('storage') => storage_path('app/public'),
],
];
8 changes: 4 additions & 4 deletions config/hashing.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
|
*/

'driver' => 'bcrypt',
'driver' => env('HASHING_ALGORITHM', 'bcrypt'),

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -43,8 +43,8 @@
*/

'argon' => [
'memory' => 1024,
'threads' => 2,
'time' => 2,
'memory' => env('ARGON_MEMORY', 1024),
'threads' => env('ARGON_THREADS', 2),
'time' => env('ARGON_TIME', 2),
],
];
69 changes: 2 additions & 67 deletions config/logging.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<?php

use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;

return [
/*
|--------------------------------------------------------------------------
Expand All @@ -16,7 +12,7 @@
|
*/

'default' => env('LOG_CHANNEL', 'stack'),
'default' => 'log',

/*
|--------------------------------------------------------------------------
Expand All @@ -34,68 +30,7 @@
*/

'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'ignore_exceptions' => false,
],

'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
],

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

'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => 'critical',
],

'papertrail' => [
'driver' => 'monolog',
'level' => 'debug',
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],

'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
],

'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
],

'errorlog' => [
'driver' => 'errorlog',
'level' => 'debug',
],

'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],

'emergency' => [
'log' => [
'path' => storage_path('logs/laravel.log'),
],
],
Expand Down
11 changes: 3 additions & 8 deletions config/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
d7415 marked this conversation as resolved.
Show resolved Hide resolved
'host' => env('MAIL_HOST'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
Expand All @@ -61,11 +61,6 @@
'path' => '/usr/sbin/sendmail -bs',
],

'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],

'array' => [
'transport' => 'array',
],
Expand All @@ -83,8 +78,8 @@
*/

'from' => [
'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
'name' => env('MAIL_FROM_NAME', 'Example'),
'address' => env('MAIL_FROM_ADDRESS'),
'name' => env('MAIL_FROM_NAME', env('APP_NAME', 'Lychee')),
],

/*
Expand Down
Loading