From a8cf0fd940b2244119fa09e9bb3df568e61cfe97 Mon Sep 17 00:00:00 2001 From: Nick Sellen Date: Sat, 3 Jan 2026 11:04:09 +0000 Subject: [PATCH 1/3] Move elasticsearch into separate compose file --- .env.sample | 7 ++++--- compose.elasticsearch.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 compose.elasticsearch.yml diff --git a/.env.sample b/.env.sample index d76ff8b..3bb079b 100644 --- a/.env.sample +++ b/.env.sample @@ -67,9 +67,10 @@ REDIS_PORT=6379 # ElasticSearch # -------------------------------------- -ES_ENABLED=true -ES_HOST=es -ES_PORT=9200 +# COMPOSE_FILE="$COMPOSE_FILE:compose.elasticsearch.yml" +# ES_ENABLED=true +# ES_HOST=es +# ES_PORT=9200 # StatsD (CURRENTLY NOT SUPPORTED) # ------------------------------- diff --git a/compose.elasticsearch.yml b/compose.elasticsearch.yml new file mode 100644 index 0000000..7b7200a --- /dev/null +++ b/compose.elasticsearch.yml @@ -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 + - ES_HOST + - ES_PORT + + streaming: + environment: *es-env + + sidekiq: + environment: *es-env + +volumes: + es: -- 2.49.0 From f4f105aea6b4606607b37115f26cf85191c3a94b Mon Sep 17 00:00:00 2001 From: Nick Sellen Date: Sun, 4 Jan 2026 10:58:29 +0000 Subject: [PATCH 2/3] Remove elasticsearch from compose.yml --- compose.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/compose.yml b/compose.yml index a08fffe..140271a 100644 --- a/compose.yml +++ b/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: -- 2.49.0 From faf931a91a1f5ac051f5894d9f848395e3776285 Mon Sep 17 00:00:00 2001 From: Nick Sellen Date: Sun, 4 Jan 2026 11:09:41 +0000 Subject: [PATCH 3/3] Set ES_* vars to fixed values --- .env.sample | 3 --- compose.elasticsearch.yml | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.env.sample b/.env.sample index 3bb079b..19d30be 100644 --- a/.env.sample +++ b/.env.sample @@ -68,9 +68,6 @@ REDIS_PORT=6379 # ElasticSearch # -------------------------------------- # COMPOSE_FILE="$COMPOSE_FILE:compose.elasticsearch.yml" -# ES_ENABLED=true -# ES_HOST=es -# ES_PORT=9200 # StatsD (CURRENTLY NOT SUPPORTED) # ------------------------------- diff --git a/compose.elasticsearch.yml b/compose.elasticsearch.yml index 7b7200a..0c3e28b 100644 --- a/compose.elasticsearch.yml +++ b/compose.elasticsearch.yml @@ -20,9 +20,9 @@ services: app: environment: &es-env - - ES_ENABLED - - ES_HOST - - ES_PORT + - "ES_ENABLED=true" + - "ES_HOST=es" + - "ES_PORT=9200" streaming: environment: *es-env -- 2.49.0