-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
docker-compose.opensearch.yml
62 lines (60 loc) · 1.62 KB
/
docker-compose.opensearch.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
services:
index:
image: opensearchproject/opensearch:2.15.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
- plugins.security.disabled=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- "OPENSEARCH_INITIAL_ADMIN_PASSWORD=YenteIns3cureDefault"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- opensearch-data:/usr/share/opensearch/data
deploy:
placement:
max_replicas_per_node: 1
restart_policy:
condition: on-failure
app:
image: ghcr.io/opensanctions/yente:4.2.0
depends_on:
- index
ports:
- "127.0.0.1:8000:8000"
environment:
YENTE_INDEX_TYPE: "opensearch"
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:
opensearch-data: null