Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (67 loc) · 1.99 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (67 loc) · 1.99 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
services:
index:
image: docker.elastic.co/elasticsearch/elasticsearch:9.4.2
expose:
- "9200"
ports:
- "127.0.0.1:9200:9200"
container_name: index
environment:
- node.name=index
- cluster.name=opensanctions-index
- discovery.type=single-node
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- index-os-data:/usr/share/elasticsearch/data
healthcheck:
# curl --fail exits with an exit code >0 if anything about the request fails
test: ["CMD-SHELL", "curl --fail http://localhost:9200/_cluster/health || exit 1"]
deploy:
placement:
max_replicas_per_node: 1
restart_policy:
condition: on-failure
app:
image: ghcr.io/opensanctions/yente:5.5.0
depends_on:
index:
condition: service_healthy
ports:
- "127.0.0.1:8000:8000"
environment:
YENTE_INDEX_TYPE: "elasticsearch"
YENTE_INDEX_URL: http://index:9200
# for non-commercial use:
# YENTE_MANIFEST: /app/manifests/civic.yml
# commercial use:
YENTE_MANIFEST: /app/manifests/commercial.yml
# Get your delivery token from the customer portal: https://www.opensanctions.org/account/bulk/
OPENSANCTIONS_DELIVERY_TOKEN: "your-secret-token"
# If you want to index data from the host machine as a custom dataset,
# create a volume mount here to make that data accessible from the
# container:
# volumes:
# - "/path/on/the/host/computer:/data"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/healthz" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 3s
deploy:
mode: replicated
# Run multiple instances for better scale:
replicas: 1
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
window: 120s
volumes:
index-os-data: null