]> BookStack Code Mirror - website/blob - search/scrape.sh
Updated meilisearch setup
[website] / search / scrape.sh
1 #!/bin/bash
2
3 # This is a script that's typically ran via cront to start a scraping operation
4 # so the search index is updated.
5 # Cron example:
6 # 2 3 * * * /var/www/meilisearch/scrape.sh >> /dev/null 2>&1
7
8 # Local
9 CONFIG_DIR="$PWD/config.json"
10
11 # Production
12 #CONFIG_DIR="/var/www/meilisearch/config.json"
13
14 docker run -t --rm \
15   --network=host \
16   -e MEILISEARCH_HOST_URL='http://localhost:7700' \
17   -e MEILISEARCH_API_KEY='mLg0ioHwp2BnG5Rbxkj3ZFL6t1Y9DDmHUkUBpZ0zqmA' \
18   -v $CONFIG_DIR:/docs-scraper/config.json \
19   getmeili/docs-scraper:v0.12.12 pipenv run ./docs_scraper config.json