Updated meilisearch setup
This commit is contained in:
parent e7b1ba4c90
commit dba08647c7
7 changed files with 35 additions and 10 deletions
| @ -100,6 +100,7 @@ | |||
"selectors_exclude": [ | ||||
"footer > .container", | ||||
".edit-link", | ||||
".icon" | ||||
".icon", | ||||
".lnt" | ||||
] | ||||
} |
| @ -1,15 +1,15 @@ | |||
version: "3.3" | ||||
services: | ||||
search: | ||||
image: getmeili/meilisearch:latest | ||||
image: getmeili/meilisearch:v1.4 | ||||
restart: always | ||||
volumes: | ||||
- ./data:/home/meili/data.ms | ||||
- ./data:/meili_data | ||||
ports: | ||||
- 7700:7700 | ||||
environment: | ||||
- MEILI_ENV=production | ||||
- MEILI_MASTER_KEY=abc123 | ||||
- MEILI_MASTER_KEY=mLg0ioHwp2BnG5Rbxkj3ZFL6t1Y9DDmHUkUBpZ0zqmA | ||||
volumes: | ||||
data: | ||||
driver: local |
| @ -5,9 +5,15 @@ | |||
# Cron example: | ||||
# 2 3 * * * /var/www/meilisearch/scrape.sh >> /dev/null 2>&1 | ||||
| ||||
# Local | ||||
CONFIG_DIR="$PWD/config.json" | ||||
| ||||
# Production | ||||
#CONFIG_DIR="/var/www/meilisearch/config.json" | ||||
| ||||
docker run -t --rm \ | ||||
--network=host \ | ||||
-e MEILISEARCH_HOST_URL='http://localhost:7700' \ | ||||
-e MEILISEARCH_API_KEY='def456' \ | ||||
-v /var/www/meilisearch/config.json:/docs-scraper/config.json \ | ||||
getmeili/docs-scraper:latest pipenv run ./docs_scraper config.json | ||||
-e MEILISEARCH_API_KEY='mLg0ioHwp2BnG5Rbxkj3ZFL6t1Y9DDmHUkUBpZ0zqmA' \ | ||||
-v $CONFIG_DIR:/docs-scraper/config.json \ | ||||
getmeili/docs-scraper:v0.12.12 pipenv run ./docs_scraper config.json |
18 search/util.sh Normal file
18
search/util.sh Normal file | @ -0,0 +1,18 @@ | |||
#!/bin/bash | ||||
| ||||
# This is a collection of common utilities to help manage the Meilisearch instance | ||||
| ||||
#### Export the key to use as an environment variable | ||||
export MEILISEARCH_API_KEY='mLg0ioHwp2BnG5Rbxkj3ZFL6t1Y9DDmHUkUBpZ0zqmA' | ||||
| ||||
### Create a key | ||||
curl \ | ||||
-X POST 'http://localhost:7700/keys' \ | ||||
-H 'Content-Type: application/json' \ | ||||
-H "Authorization: Bearer $MEILISEARCH_API_KEY" \ | ||||
--data-binary '{ | ||||
"description": "Search docs key", | ||||
"actions": ["search"], | ||||
"indexes": ["docs"], | ||||
"expiresAt": "2033-01-01T00:00:00Z" | ||||
}' |
| @ -61,7 +61,7 @@ | |||
if (document.querySelector(searchInputSelector) !== null) { | ||||
docsSearchBar({ | ||||
hostUrl: 'https://search.bookstackapp.com', | ||||
apiKey: 'f896fc840ba4f2881068c5e8f0cd5c33546646967bd176ecda716dd0a89b280c', | ||||
apiKey: 'd36e621d5d924807a14c435b542aa98fd11d0c91df2526e128ecb19e617ba381', | ||||
indexUid: 'docs', | ||||
inputSelector: searchInputSelector, | ||||
debug: false, // Set debug to true if you want to inspect the dropdown | ||||
| |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue