Created
January 12, 2021 17:20
-
-
Save mafonso/b560eb5c0af0271f75fe037d6adb759d to your computer and use it in GitHub Desktop.
APM on a stack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2.2' | |
services: | |
apm-server: | |
image: docker.elastic.co/apm/apm-server:7.10.1 | |
depends_on: | |
elasticsearch: | |
condition: service_healthy | |
kibana: | |
condition: service_healthy | |
cap_add: ["CHOWN", "DAC_OVERRIDE", "SETGID", "SETUID"] | |
cap_drop: ["ALL"] | |
ports: | |
- 8200:8200 | |
networks: | |
- elastic | |
command: > | |
apm-server -e | |
-E apm-server.rum.enabled=true | |
-E setup.kibana.host=kibana:5601 | |
-E setup.template.settings.index.number_of_replicas=0 | |
-E apm-server.kibana.enabled=true | |
-E apm-server.kibana.host=kibana:5601 | |
-E output.elasticsearch.hosts=["elasticsearch:9200"] | |
healthcheck: | |
interval: 10s | |
retries: 12 | |
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:8200/ | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1 | |
environment: | |
- bootstrap.memory_lock=true | |
- cluster.name=docker-cluster | |
- cluster.routing.allocation.disk.threshold_enabled=false | |
- discovery.type=single-node | |
- ES_JAVA_OPTS=-XX:UseAVX=2 -Xms1g -Xmx1g | |
ulimits: | |
memlock: | |
hard: -1 | |
soft: -1 | |
volumes: | |
- esdata:/usr/share/elasticsearch/data | |
ports: | |
- 9200:9200 | |
networks: | |
- elastic | |
healthcheck: | |
interval: 20s | |
retries: 10 | |
test: curl -s http://localhost:9200/_cluster/health | grep -vq '"status":"red"' | |
kibana: | |
image: docker.elastic.co/kibana/kibana:7.10.1 | |
depends_on: | |
elasticsearch: | |
condition: service_healthy | |
environment: | |
ELASTICSEARCH_URL: http://elasticsearch:9200 | |
ELASTICSEARCH_HOSTS: http://elasticsearch:9200 | |
ports: | |
- 5601:5601 | |
networks: | |
- elastic | |
healthcheck: | |
interval: 10s | |
retries: 20 | |
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:5601/api/status | |
volumes: | |
esdata: | |
driver: local | |
networks: | |
elastic: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment