-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(service): add elasticsearch template #6300
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
base: next
Are you sure you want to change the base?
Conversation
Its my first template submission so any suggestions are welcomed! |
image: docker.elastic.co/elasticsearch/elasticsearch-wolfi:8.19.0 | ||
environment: | ||
- SERVICE_FQDN_ELASTICSEARCH_9200 | ||
- ELASTIC_PASSWORD=${SERVICE_PASSWORD_ELASTICSEARCH} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible also autogenerate the username
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it seems its not possible via env vars for this docker image, it only creates a default user elastic
. one can configure users later, but not via env vars on the docker image setup.
environment: | ||
- SERVICE_FQDN_ELASTICSEARCH_9200 | ||
- ELASTIC_PASSWORD=${SERVICE_PASSWORD_ELASTICSEARCH} | ||
- ES_JAVA_OPTS=-Xms512m -Xmx512m # memory set to 512MB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this should be adjustable by the user or if it's correct as is. It looks a bit weird to me probably we do not need -Xmx512m
2 times?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It comes from here https://www.elastic.co/docs/deploy-manage/deploy/self-managed/install-elasticsearch-docker-prod#docker-set-heap-size - basically I did it with the idea that most of Coolify users would run it on relatively small VPS boxes, and I didn't want that ES would take a lot of memory as it would do otherwise.
I guess some users would be willing to configure this afterwards, but this is advanced case so I guess people who know what they are doing would dig into ES docs and set needed env vars as they need it. Or should I set it something like: ES_JAVA_OPTS=${ES_JAVA_OPTS:-"-Xms512m -Xmx512m"}
not sure though if it'll work with the string here.
And its not 2 times, those are two different values, one with ms and one with mx in it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this setting Elasticsearch eats a ton of RAM, basically half of what is available. I faced this problem on one of my servers, and don't want that people will get into this issue as well.
More general question I have - some people want to run ES as a public web service (for example so that frontend can directly pull data from it), but some users want to run it in the internal project network so that only backend services can access it (like one runs PG or Redis). But I don't know how one can configure this, and secondly, if one cannot configure that, I don't even know what is the right place to add those kind of the comments so that at least users are aware of this. Any hints? |
Changes