forked from railwayapp/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (36 loc) · 1.47 KB
/
docker-compose.yml
File metadata and controls
38 lines (36 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
services:
meilisearch:
image: getmeili/meilisearch:v1.12
container_name: docs-meilisearch
ports:
- "7700:7700"
environment:
- MEILI_MASTER_KEY=${MEILISEARCH_API_KEY:-local_master_key}
- MEILI_ENV=development
- MEILI_LOG_LEVEL=INFO
- MEILI_NO_ANALYTICS=true
volumes:
- meilisearch_data:/meili_data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
docs-scraper:
image: getmeili/docs-scraper:latest
profiles: ["scraper"]
depends_on:
meilisearch:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- MEILISEARCH_HOST_URL=http://meilisearch:7700
- MEILISEARCH_API_KEY=${MEILISEARCH_API_KEY:-local_master_key}
volumes:
- ./meilisearch-docs-scraper.config.json:/docs-scraper/config.json:ro
command: >
sh -c "python3 -c 'import json; c=json.load(open(\"/docs-scraper/config.json\")); c[\"index_uid\"]=\"docs_local_dev\"; c[\"start_urls\"]=[{\"url\":\"http://host.docker.internal:3001/\"}]; c[\"sitemap_urls\"]=[]; c[\"scrape_start_urls\"]=True; c[\"allowed_domains\"]=[\"host.docker.internal\"]; c[\"stop_urls\"]=[\"http://host.docker.internal:3001/guides.*\"]; json.dump(c,open(\"/tmp/local.json\",\"w\")); print(\"Starting scrape from root URL\")' && pipenv run ./docs_scraper /tmp/local.json"
volumes:
meilisearch_data: