Move elasticsearch into separate compose file #33

Merged
ammaratef45 merged 3 commits from change/es-compose into main 2026-01-04 22:19:00 +00:00
Owner

Similar to my PR for hometown 3 years back --> coop-cloud/hometown#15

Currently the mastodon recipe includes elasticsearch whether it is enabled or not. This changes it so you opt-in by including the additional compose file.

One minor difference to my hometown changes is that I decided not to add ES_ENABLE=true to the compose.elasticsearch.yml file itself, but leave you to set that in the env. It seems a bit redundant to me to include it and have to enable it, but I think that's what other recipes do, and potentially you might want to keep the service running, but not have it enabled in mastodon? For debugging or something?

If approved, it'll need a release message something along the lines of:

If you are using elasticsearch you need to explicitly include compose.elasticsearch.yml now or the elasticsearch service will not run

Similar to my PR for hometown 3 years back --> https://git.coopcloud.tech/coop-cloud/hometown/pulls/15 Currently the mastodon recipe includes elasticsearch whether it is enabled or not. This changes it so you opt-in by including the additional compose file. One minor difference to my hometown changes is that I decided not to add ES_ENABLE=true to the compose.elasticsearch.yml file itself, but leave you to set that in the env. It seems a bit redundant to me to include it _and_ have to enable it, but I think that's what other recipes do, and potentially you might want to keep the service running, but not have it enabled in mastodon? For debugging or something? If approved, it'll need a release message something along the lines of: > If you are using elasticsearch you need to explicitly include compose.elasticsearch.yml now or the elasticsearch service will not run
nicksellen added 1 commit 2026-01-03 11:09:58 +00:00
Move elasticsearch into separate compose file
Some checks failed
continuous-integration/drone/pr Build is failing
a8cf0fd940
decentral1se requested review from 3wordchant 2026-01-03 14:27:42 +00:00
decentral1se requested review from cas 2026-01-03 14:27:50 +00:00
decentral1se requested review from ammaratef45 2026-01-03 14:27:53 +00:00
Owner

Asking for reviews from people who've committed stuff here in the past.

This recipe would benefit from a maintainer!

https://docs.coopcloud.tech/maintainers/maintain/

(WIP docs but we're trying to work on formalising this better!)

Asking for reviews from people who've committed stuff here in the past. This recipe would benefit from a maintainer! > https://docs.coopcloud.tech/maintainers/maintain/ (WIP docs but we're trying to work on formalising this better!)
ammaratef45 requested changes 2026-01-04 07:24:02 +00:00
Dismissed
ammaratef45 left a comment
Owner

Left a couple of comments, I also see the PR doesn't include the changes to the compose.yml file, maybe you forgot to add it to the commit?

Left a couple of comments, I also see the PR doesn't include the changes to the `compose.yml` file, maybe you forgot to add it to the commit?
.env.sample Outdated
@ -71,2 +70,2 @@
ES_HOST=es
ES_PORT=9200
# COMPOSE_FILE="$COMPOSE_FILE:compose.elasticsearch.yml"
# ES_ENABLED=true
Owner

I'm assuming whoever uncomments the COMPOSE_FILE="$COMPOSE_FILE:compose.elasticsearch.yml" line would like ES_ENABLED=true to be the value, so no need to keep it in env file?

I'm assuming whoever uncomments the `COMPOSE_FILE="$COMPOSE_FILE:compose.elasticsearch.yml"` line would like `ES_ENABLED=true` to be the value, so no need to keep it in env file?
Owner

Oops, you already addressed that in the PR description, sorry about that 😆

potentially you might want to keep the service running, but not have it enabled in mastodon? For debugging or something?

I doubt this is a common enough use-case that we would want to allow for it from the configurations, devs can always use --chaos for such use cases, wdyt?

Oops, you already addressed that in the PR description, sorry about that 😆 > potentially you might want to keep the service running, but not have it enabled in mastodon? For debugging or something? I doubt this is a common enough use-case that we would want to allow for it from the configurations, devs can always use `--chaos` for such use cases, wdyt?
Author
Owner

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.

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.
ammaratef45 marked this conversation as resolved
.env.sample Outdated
@ -73,0 +70,4 @@
# COMPOSE_FILE="$COMPOSE_FILE:compose.elasticsearch.yml"
# ES_ENABLED=true
# ES_HOST=es
# ES_PORT=9200
Owner

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?

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`?
ammaratef45 marked this conversation as resolved
nicksellen added 2 commits 2026-01-04 11:10:03 +00:00
Set ES_* vars to fixed values
Some checks failed
continuous-integration/drone/pr Build is failing
faf931a91a
Author
Owner

Ok, updated!

  • include the changes to compose.yml, good spot!
  • changed to use fixed values in the compose.elasticsearch.yml, so nothing to set in .env
  • also quoted the env variables
Ok, updated! - include the changes to compose.yml, good spot! - changed to use fixed values in the compose.elasticsearch.yml, so nothing to set in .env - also quoted the env variables
ammaratef45 approved these changes 2026-01-04 22:18:38 +00:00
ammaratef45 left a comment
Owner

ship it!

ship it!
ammaratef45 merged commit 9d5927f60a into main 2026-01-04 22:19:00 +00:00
ammaratef45 deleted branch change/es-compose 2026-01-04 22:19:00 +00:00
Sign in to join this conversation.
No description provided.