add logging
This commit is contained in:
@@ -20,13 +20,55 @@ Das Bundle erweitert den Contao-Suchindex um strukturierte Daten und ermöglicht
|
|||||||
- Kompatibel mit:
|
- Kompatibel mit:
|
||||||
- Contao **4.13**, **5.6** und **5.7**
|
- Contao **4.13**, **5.6** und **5.7**
|
||||||
- PHP **8.4**
|
- 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
|
Das Bundle nutzt **keinen eigenen Contao-Cron**, sondern System-Cronjobs.
|
||||||
composer require mummertmedia/contao-meilisearch-bundle:^0.1
|
|
||||||
|
## 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
|
||||||
Reference in New Issue
Block a user