Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Elasticsearch configuration file to avoid tricky envvar names #4992

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ services:
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.2
ports:
- "50292:9200"
env_file:
- docker/es/env.docker
environment:
# Elasticsearch will reserve 50-60% of available system memory
# if left to its own devices. Setting this to half a GB is sufficient
# for local testing and prevent ES from hogging such a significant
# amount of system memory.
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
healthcheck:
test:
[
Expand All @@ -111,6 +115,7 @@ services:
hard: 65536
volumes:
- es-data:/usr/share/elasticsearch/data
- ./docker/es/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml

volumes:
api-postgres:
Expand Down
12 changes: 12 additions & 0 deletions docker/es/elasticsearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Disable XPack
# https://www.elastic.co/guide/en/elasticsearch/reference/5.3/docker.html#_security_note
xpack.security.enabled: false

discovery.type: single-node

network.host: 0.0.0.0
network.bind_host: 0.0.0.0
network.publish_host: 0.0.0.0

http.cors.enabled: true
http.cors.allow-origin: "/.*/"
14 changes: 0 additions & 14 deletions docker/es/env.docker

This file was deleted.