Тип сервиса
Сервис Meilisearch
Самостоятельно размещаемый Meilisearch для быстрого полнотекстового поиска по данным приложения с учётом опечаток и постоянным хранилищем индексов.
Вы добавляете этот сервис в стек и выбираете там его версию и ресурсы. Каждое окружение может их переопределить.
В StackMaster
Как Meilisearch работает в StackMaster
How applications reach it
- Inside the cluster:
http://<app service name>:7700. Port7700also has a public HTTPS domain, so browsers and mobile apps can search Meilisearch directly. - Every route except
GET /healthneeds an API key, sent asAuthorization: Bearer <key>. - The master key is generated by Wodby (token
master_key) and is inMEILI_MASTER_KEYinside this container. Use it only to manage API keys and on the backend; never put it in browser code or the repository. - Meilisearch creates default keys from the master key, including Default Search API Key (search only, safe for frontends) and Default Admin API Key (all actions, for backends that index documents). List them with
GET /keysand the master key, or create narrower keys withPOST /keys. - A service linked to this one receives the address and keys in variables named by the linking service, for example
MEILISEARCH_HOSTset tohttp://{{link.host}}:{{link.port}}andMEILISEARCH_KEYto{{link.tokens.master_key}}. Read them in code.
What is configured
MEILI_ENVisdevelopmentindevenvironments, which keeps the search preview at the service address, andproductioneverywhere else, which turns the preview off. Both use the master key.MEILI_NO_ANALYTICSturns Meilisearch's telemetry off.- The service is not scalable: Meilisearch runs one instance on one volume.
- Indexing uses up to two thirds of the container memory limit. Set a memory limit that fits the largest indexing batch; change it with
MEILI_MAX_INDEXING_MEMORYonly when needed. - The container runs as user
1000, not root.
Version updates
A Meilisearch database opens only with the version that wrote it. The manifest sets MEILI_UPGRADE_DB, so when an image update brings a newer version, Meilisearch upgrades the database in place on startup. The upgrade runs as an upgradeDatabase task (GET /tasks?types=upgradeDatabase); new tasks wait for it, searches keep working.
Meilisearch warns that this upgrade is not atomic and can, rarely, corrupt the database. Before upgrading a production environment, create a dump (POST /dumps), or be ready to reindex from the application's own data. A failed or stuck upgrade task can be cancelled, which rolls the database back. A database from Meilisearch older than 1.12 cannot be upgraded in place and must be moved with a dump.
Changing configuration
Meilisearch settings are environment variables named MEILI_* on this service. Index settings (searchable, filterable and sortable attributes, ranking rules, synonyms) are set through the API per index, not in the manifest.
Changing the master key changes every key derived from it: the default keys and all keys created with POST /keys stop working, and clients need the new keys.
Data
The database is in /meili_data/data.ms on the data volume. Dumps (POST /dumps) are written to /meili_data/dumps and snapshots (POST /snapshots) to /meili_data/snapshots on the same volume, so they use its space. The manifest declares no Wodby backups, imports or actions.
Check the result
From this service's container:
curl -s localhost:7700/healthcurl -s -H "Authorization: Bearer $MEILI_MASTER_KEY" localhost:7700/versioncurl -s -H "Authorization: Bearer $MEILI_MASTER_KEY" localhost:7700/keys
Обзор
Технический профиль Meilisearch
Версии
Репозиторий исходного кода
Публичный Helm-чарт
Постоянные тома
Стеки
Стеки, в которые входит Meilisearch
Конфигурация
Конфигурация сервиса Meilisearch
Технические домены
Тома