elasticsearch-cloudron/elasticsearch.yml

72 lines
2.5 KiB
YAML

# ======================== Elasticsearch Configuration =========================
# ---------------------------------- Cluster -----------------------------------
cluster.name: cloudron-cluster
# ------------------------------------ Node ------------------------------------
node.name: ${HOSTNAME}
# In Elasticsearch 8.x, a node is both a master-eligible and data node by default
# To change this behavior, use roles instead: node.roles: [ master, data, ...]
# ----------------------------------- Paths ------------------------------------
path.data: /app/data/elasticsearch
path.logs: /app/data/logs
# ---------------------------------- Network -----------------------------------
network.host: 0.0.0.0
http.port: 9200
transport.port: 9300
# --------------------------------- Discovery ----------------------------------
discovery.type: single-node
# --------------------------------- Security ----------------------------------
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: false
xpack.security.http.ssl.enabled: false
xpack.security.authc.token.enabled: false
xpack.security.authc.api_key.enabled: false
xpack.security.authc.password_hashing.algorithm: bcrypt
# ----------------------------------- Memory ----------------------------------
# Memory locking to prevent swapping
bootstrap.memory_lock: true
# ---------------------------------- HTTP/REST API ---------------------------
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: "X-Requested-With, X-Auth-Token, Content-Type, Content-Length, Authorization"
# Allow auto-creation of system indices
action.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*
# ---------------------------------- Performance Optimizations ------------------
# Circuit breaker settings
indices.breaker.total.limit: 70%
# Memory optimization
indices.fielddata.cache.size: 20%
indices.memory.index_buffer_size: 20%
indices.queries.cache.size: 15%
# Thread pool and queue sizes
thread_pool.write.queue_size: 1000
thread_pool.search.queue_size: 1000
# I/O optimization
bootstrap.system_call_filter: false
# Default index settings
index.number_of_shards: 1
index.number_of_replicas: 0
# Merge settings for better indexing performance
index.merge.scheduler.max_thread_count: 1
index.merge.policy.floor_segment: 2mb
index.merge.policy.max_merge_at_once: 4
index.merge.policy.segments_per_tier: 8
# Set processors based on container configuration
processors: ${PROCESSORS:1}