{% include 'roles/sys-svc-compose/templates/base.yml.j2' %} {% set service_name = 'elasticsearch' %} {{ service_name }}: {{ lookup('compose_only', 'container_name', ELASTICSEARCH_CONTAINER) }} {{ lookup('container_image', application_id, 'elasticsearch') }} ulimits: memlock: soft: -1 hard: -1 {% include 'roles/sys-svc-container/templates/base.yml.j2' %} {% if ELASTICSEARCH_EXPOSE_LOCAL %} {{ lookup('container_ports', ['elasticsearch', 'elasticsearch', DOCKER_BIND_HOST]) | indent(4) }} {% endif %} {{ lookup('container_volumes', service_name) | indent(4) }} {{ lookup('container_networks') | indent(4) }} healthcheck: test: - "CMD-SHELL" - "curl -fsS -u elastic:{{ ELASTICSEARCH_PASSWORD }} http://127.0.0.1:{{ ELASTICSEARCH_INTERNAL_PORT }}/_cluster/health || exit 1" interval: 2m timeout: 5s retries: 18 start_period: 10m start_interval: 5s {{ lookup('compose_volumes') }} {{ lookup('compose_networks') }}