Example: Meilisearch running as a separate docker container and available at http://localhost:7700
Remark: All get master API key that setup to MeiliSearch and then request admin API key for setup in step 2. (your-api-key)
server: {
type: 'meilisearch',
host: 'http://host.docker.internal:7700', // accessing localhost within a container
key: '<your-api-key>',
},
reindexOnStart: true, // Need ""true" for this tutorial
collections: {
test_collection: { // name of the directus-collection
fields: ['title', 'description'], // fields of the directus-collection
},
},
docker compose -f docker-compose.yml up --build
If you see this, you know all is fine. We haven't created the collection yet.
5. Login to Directus with http://localhost:8055
// Initial values from .env
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=123qweasd
pressing CTRL+C
(Windows) to cancel running command
docker compose -f docker-compose.yml up
10. Check - Meilisearch Dashboard at http://localhost:7700
You should find the collection "test_collection" as an available index. When selected, we should see our item.