forked from opensearch-project/observability-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.local-opensearch.yml
More file actions
61 lines (58 loc) · 1.94 KB
/
Copy pathdocker-compose.local-opensearch.yml
File metadata and controls
61 lines (58 loc) · 1.94 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
# Local OpenSearch - include this file when running OpenSearch locally instead of cloud
# Included by default via INCLUDE_COMPOSE_LOCAL_OPENSEARCH in .env
# To use a cloud OpenSearch instance, comment out INCLUDE_COMPOSE_LOCAL_OPENSEARCH in .env
x-default-logging: &logging
driver: "json-file"
options:
max-size: "5m"
max-file: "2"
tag: "{{.Name}}"
volumes:
opensearch-data:
driver: local
services:
# OpenSearch - Stores and indexes logs and traces for search and analysis
opensearch:
image: ${OPENSEARCH_DOCKER_REPO}/opensearch:${OPENSEARCH_VERSION}
container_name: opensearch
pull_policy: always
environment:
# Single-node cluster for development
- cluster.name=observability-stack-cluster
- node.name=observability-stack-node
- discovery.type=single-node
- bootstrap.memory_lock=true
# Set heap size (adjust based on available memory)
- OPENSEARCH_JAVA_OPTS=${OPENSEARCH_JAVA_OPTS}
# Initial admin password (required for OpenSearch 2.12+)
- "OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD}"
- plugins.query.datasources.encryption.masterkey=BTqK4Ytdz67La1kShIKV3Pu9
volumes:
# Persist data across container restarts
- opensearch-data:/usr/share/opensearch/data
ports:
# REST API endpoint
- "${OPENSEARCH_PORT}:9200"
# Performance analyzer
- "9600:9600"
networks:
- observability-stack-network
restart: unless-stopped
deploy:
resources:
limits:
memory: ${OPENSEARCH_MEMORY_LIMIT}
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
healthcheck:
test: curl -s -k -u '${OPENSEARCH_USER}':'${OPENSEARCH_PASSWORD}' ${OPENSEARCH_PROTOCOL}://localhost:9200/_cluster/health | grep -E '"status":"(green|yellow)"'
start_period: 120s
interval: 5s
timeout: 10s
retries: 30
logging: *logging