forked from ome/docker-example-omero-grid
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathopensearch-compose.yml
More file actions
74 lines (70 loc) · 2.17 KB
/
opensearch-compose.yml
File metadata and controls
74 lines (70 loc) · 2.17 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
70
71
72
73
74
services:
opensearch:
image: opensearchproject/opensearch:3
container_name: opensearch
environment:
- discovery.type=single-node
- plugins.security.disabled=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- bootstrap.memory_lock=true
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=!Omero12345
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- "9200:9200"
- "9300:9300"
- "9600:9600" # Performance Analyzer
volumes:
- opensearch-data:/usr/share/opensearch/data
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health | grep -q 'green\\|yellow'"]
interval: 30s
timeout: 10s
retries: 5
# Use Fluent Bit for better OpenSearch compatibility
fluent-bit:
image: fluent/fluent-bit:2.2.0
container_name: fluent-bit
depends_on:
opensearch-init:
condition: service_completed_successfully
volumes:
- ./opensearch/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf:ro
- ./opensearch/parsers.conf:/fluent-bit/etc/parsers.conf:ro
- ./opensearch/normalize.lua:/fluent-bit/etc/normalize.lua:ro
- ./logs:/logs:ro
- fluent-bit-db:/fluent-bit/db
command: /opt/fluent-bit/bin/fluent-bit --config=/fluent-bit/etc/fluent-bit.conf
# Init container to set up index template before fluent-bit starts
opensearch-init:
image: curlimages/curl:latest
container_name: opensearch-init
depends_on:
opensearch:
condition: service_healthy
volumes:
- ./opensearch/init-opensearch.sh:/init.sh:ro
entrypoint: ["/bin/sh", "/init.sh"]
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:3
container_name: opensearch-dashboards
depends_on:
opensearch:
condition: service_healthy
ports:
- "5601:5601"
environment:
- OPENSEARCH_HOSTS=["http://opensearch:9200"]
- DISABLE_SECURITY_DASHBOARDS_PLUGIN=true
- server.host=0.0.0.0
volumes:
- opensearch-dashboards-data:/usr/share/opensearch-dashboards/data
volumes:
opensearch-data:
fluent-bit-db:
opensearch-dashboards-data: