From c223ae692f5917b102fdd74168e9a770a0e7e280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Mummert?= Date: Fri, 9 Jan 2026 10:32:05 +0100 Subject: [PATCH] add logging --- README.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2f115cf..24b09fa 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,55 @@ Das Bundle erweitert den Contao-Suchindex um strukturierte Daten und ermöglicht - Kompatibel mit: - Contao **4.13**, **5.6** und **5.7** - PHP **8.4** -- Entwickelt als **eigenständiges Contao-Bundle** --- -## 📦 Installation +## ⏱️ Scheduled Indexing (Cron setup) -Installation über Composer: +Das Bundle stellt eigene Commands zur Verfügung, um Dateien zu bereinigen und den Meilisearch-Index neu aufzubauen. +Für den produktiven Einsatz wird empfohlen, diese Commands regelmäßig per **System-Crontab** auszuführen. -```bash -composer require mummertmedia/contao-meilisearch-bundle:^0.1 \ No newline at end of file +Das Bundle nutzt **keinen eigenen Contao-Cron**, sondern System-Cronjobs. + +## Verfügbare Commands + +### Datei-Cleanup + +``` +/vendor/bin/contao-console meilisearch:files:cleanup +``` + +### Meilisearch-Index + +``` +/vendor/bin/contao-console meilisearch:index +``` + +## Empfohlene Reihenfolge + +1. Datei-Cleanup + `/vendor/bin/contao-console meilisearch:files:cleanup` + +2. Contao-Crawl (ca. 1 Minute später) + `/vendor/bin/contao-console contao:crawl` + +3. Meilisearch-Index (ca. 15 Minuten später) + `/vendor/bin/contao-console meilisearch:index` + +## Beispiel Crontab + +``` +0 5 * * * /usr/bin/php8.4 /path/to/project/vendor/bin/contao-console meilisearch:files:cleanup +1 5 * * * /usr/bin/php8.4 /path/to/project/vendor/bin/contao-console contao:crawl +15 5 * * * /usr/bin/php8.4 /path/to/project/vendor/bin/contao-console meilisearch:index +``` + +## Logging + +``` +>> var/logs/meilisearch_cron.log 2>&1 +``` + +## Lizenz + +MIT \ No newline at end of file