Skip to content

A self-hosted media server and file management system

fix: default docker env did not setup redis, and auto index job happened too often

aminnausin3a30f6efd08b
diff --git a/.env.example b/.env.example
index 19c76624..167c0133 100755
--- a/.env.example
+++ b/.env.example
@@ -46,7 +46,7 @@ FILESYSTEM_DISK=local
QUEUE_CONNECTION=redis
CACHE_DRIVER=file
-CACHE_STORE=database
+CACHE_STORE=redis
CACHE_PREFIX=
MEMCACHED_HOST=127.0.0.1
diff --git a/docker/.env.docker b/docker/.env.docker
index dbc8977b..6b93cca7 100644
--- a/docker/.env.docker
+++ b/docker/.env.docker
@@ -33,6 +33,16 @@ DB_DATABASE=mediaServer
DB_USERNAME=postgres
DB_PASSWORD=root
+# Redis connection (Docker default)
+REDIS_CLIENT=phpredis
+REDIS_HOST=127.0.0.1
+REDIS_PASSWORD=null
+REDIS_PORT=6379
+
+# Queues/Cache — Set to database if you are not running Redis (Not Recommended)
+QUEUE_CONNECTION=redis
+CACHE_STORE=redis
+
# Trusted proxies — Change to proxy IPs if needed
TRUSTED_PROXIES=*
diff --git a/routes/console.php b/routes/console.php
index e182cb60..8b45c36d 100755
--- a/routes/console.php
+++ b/routes/console.php
@@ -3,7 +3,7 @@
use App\Jobs\ScheduledIndexFiles;
use Illuminate\Support\Facades\Schedule;
-Schedule::job(new ScheduledIndexFiles)->everySixHours()->withoutOverlapping()->environments(['staging', 'production']);
+Schedule::job(new ScheduledIndexFiles)->twiceDaily()->withoutOverlapping()->environments(['staging', 'production']);
Schedule::command('auth:clear-resets')->everyFifteenMinutes();
Schedule::command('sanctum:prune-expired --hours=2')->daily();