forked from opensanctions/yente
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (60 loc) · 1.59 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
62
version: "3.9"
services:
index:
image: docker.elastic.co/elasticsearch/elasticsearch:8.7.0
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=-Xms1g -Xmx1g"
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:latest
depends_on:
- index
ports:
- "127.0.0.1:8000:8000"
environment:
YENTE_ELASTICSEARCH_URL: http://index:9200
YENTE_STATEMENT_API: "false"
# 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