-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
docker-compose.yml
61 lines (59 loc) · 1.57 KB
/
docker-compose.yml
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
services:
index:
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.3
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=-Xms2g -Xmx2g"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- index-os-data:/usr/share/elasticsearch/data
deploy:
placement:
max_replicas_per_node: 1
restart_policy:
condition: on-failure
app:
image: ghcr.io/opensanctions/yente:4.1.0
depends_on:
- index
ports:
- "127.0.0.1:8000:8000"
environment:
YENTE_INDEX_TYPE: "elasticsearch"
YENTE_INDEX_URL: http://index:9200
# Set this to a randomly generated string to enable the /updatez API:
YENTE_UPDATE_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