Skip to content

Commit

Permalink
add docker-compose-es7.yml
Browse files Browse the repository at this point in the history
* add utility makefile commands

 mn/#87-support-elastic-7
  • Loading branch information
codekiln committed Jul 10, 2023
1 parent 11f3731 commit e7c0659
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,42 @@ nuke:
@echo "Removing containers, networks, and data... 🧨"
@echo
docker compose down -v

es-health-local-api:
@echo "Assuming you've got docker up, getting health of elasticsearch... 📄"
@echo
curl 'localhost:9200/_cat/health?format=json&pretty=true'
@echo

es-list-indexes-local-api:
@echo "Assuming you've got docker up, getting elasticsearch indexes via API call... 📄"
curl 'localhost:9200/_cat/indices?format=json&pretty=true'

es-print-java-env:
@echo "printing runtime value of ES_JAVA_OPTS"
docker-compose run --rm elastic printenv ES_JAVA_OPTS

up: ## check coding style with pycodestyle and pylint
@echo "Bringing up elastic 6 in docker 🚀"
docker compose up -d --remove-orphans

down:
@echo "Destroying local containers, but keeping data volumes intact... 😴"
docker compose down

es7up:
@echo "Bringing up elastic 7 in docker 🚀"
docker compose -f docker-compose-es7.yml up -d --remove-orphans

es7down:
@echo "Destroying local containers, but keeping data volumes intact... 😴"
docker compose -f docker-compose-es7.yml down

#es7up2:
# @echo "Bringing up elastic 7 in docker 🚀"
# docker compose -f docker-compose-es7-2.yml up -d --remove-orphans
#
#es7down2:
# @echo "Destroying local containers, but keeping data volumes intact... 😴"
# docker compose -f docker-compose-es7-2.yml down

42 changes: 42 additions & 0 deletions docker-compose-es7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: "3.0"
services:
elastic:
container_name: es-container
# ARM build for M1 Macs # linux/arm/v7
# image: elasticsearch/elasticsearch-oss:7.10.2-arm64
# https://hub.docker.com/layers/library/elasticsearch/7.10.1/images/sha256-a7b465c42780a7e92892878ea30941b427d691698a100454dee7296140cdb889?context=explore
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2 # linux/arm64/v8
# image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2 # linux/arm64/v8
environment:
- xpack.security.enabled=false
- "discovery.type=single-node"
- bootstrap.system_call_filter=false
networks:
- es-net
ports:
- "9200:9200"
volumes:
# for normal elasticsearch:
- elasticsearch:/usr/share/elasticsearch/data
kibana:
container_name: kb-container
# image: kibana/kibana-oss:7.10.2
# ARM build for M1 Macs
# image: jamesgarside/kibana:7.10.2
# linux/arm64
# image: kibana:7.17.10
image: docker.elastic.co/kibana/kibana:7.10.2
environment:
- ELASTICSEARCH_HOSTS=http://es-container:9200
networks:
- es-net
depends_on:
- elastic
ports:
- "5601:5601"
networks:
es-net:
driver: bridge
volumes:
elasticsearch:
driver: local

0 comments on commit e7c0659

Please sign in to comment.