generated from coop-cloud/example
Move elasticsearch into separate compose file #33
@ -67,9 +67,7 @@ REDIS_PORT=6379
|
||||
|
||||
# ElasticSearch
|
||||
# --------------------------------------
|
||||
ES_ENABLED=true
|
||||
ES_HOST=es
|
||||
ES_PORT=9200
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.elasticsearch.yml"
|
||||
|
||||
|
ammaratef45 marked this conversation as resolved
Outdated
|
||||
# StatsD (CURRENTLY NOT SUPPORTED)
|
||||
# -------------------------------
|
||||
|
ammaratef45 marked this conversation as resolved
Outdated
ammaratef45
commented
Same with host and port, since Same with host and port, since `es` is the host name in the compose file and I'm assuming 9200 is the port configured for the image `docker.elastic.co/elasticsearch/elasticsearch-oss`?
|
||||
|
||||
34
compose.elasticsearch.yml
Normal file
34
compose.elasticsearch.yml
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
es:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
|
||||
environment:
|
||||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
- "cluster.name=es-mastodon"
|
||||
- "discovery.type=single-node"
|
||||
- "bootstrap.memory_lock=true"
|
||||
networks:
|
||||
- internal
|
||||
volumes:
|
||||
- es:/usr/share/elasticsearch/data
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
|
||||
app:
|
||||
environment: &es-env
|
||||
- "ES_ENABLED=true"
|
||||
- "ES_HOST=es"
|
||||
- "ES_PORT=9200"
|
||||
|
||||
streaming:
|
||||
environment: *es-env
|
||||
|
||||
sidekiq:
|
||||
environment: *es-env
|
||||
|
||||
volumes:
|
||||
es:
|
||||
17
compose.yml
17
compose.yml
@ -185,22 +185,6 @@ services:
|
||||
volumes:
|
||||
- redis:/data
|
||||
|
||||
es:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
|
||||
environment:
|
||||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
- "cluster.name=es-mastodon"
|
||||
- "discovery.type=single-node"
|
||||
- "bootstrap.memory_lock=true"
|
||||
networks:
|
||||
- internal
|
||||
volumes:
|
||||
- es:/usr/share/elasticsearch/data
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
|
||||
secrets:
|
||||
secret_key_base:
|
||||
name: ${STACK_NAME}_secret_key_base_${SECRET_SECRET_KEY_BASE_VERSION}
|
||||
@ -231,7 +215,6 @@ volumes:
|
||||
app:
|
||||
redis:
|
||||
postgres:
|
||||
es:
|
||||
|
||||
networks:
|
||||
internal:
|
||||
|
||||
Reference in New Issue
Block a user
I'm assuming whoever uncomments the
COMPOSE_FILE="$COMPOSE_FILE:compose.elasticsearch.yml"line would likeES_ENABLED=trueto be the value, so no need to keep it in env file?Oops, you already addressed that in the PR description, sorry about that 😆
I doubt this is a common enough use-case that we would want to allow for it from the configurations, devs can always use
--chaosfor such use cases, wdyt?I was on the fence about whether to hardcode the values, but given your comment I think it makes sense to just make it simple, so you only have to include the extra compose file, and all the values are set right.