Created
July 8, 2018 07:54
-
-
Save abhinav1107/25f326c4fb59dfdff95d12cb226d15f5 to your computer and use it in GitHub Desktop.
docker compose file to create 2 elasticsearch node cluster, 1 redis, and 2 normal python clients. This was written to show Python's pickling and un-pickling process. The required Dockerfile is also added
This file contains hidden or 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
From python:2.7-alpine | |
RUN pip install dill redis elasticsearch |
This file contains hidden or 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: '3' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.1 | |
container_name: estest1 | |
environment: | |
- cluster.name=myTestCluster | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 | |
volumes: | |
- esdata1:/usr/share/elasticsearch/data | |
ports: | |
- 9200:9200 | |
networks: | |
- esnet | |
elasticsearch2: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.1 | |
container_name: estest2 | |
environment: | |
- cluster.name=myTestCluster | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
- "discovery.zen.ping.unicast.hosts=estest1" | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 | |
volumes: | |
- esdata2:/usr/share/elasticsearch/data | |
networks: | |
- esnet | |
redis: | |
image: redis:alpine | |
container_name: redis1 | |
ports: | |
- 6379:6379 | |
networks: | |
- esnet | |
pclient1: | |
image: myesclient:latest | |
build: . | |
container_name: pclient1 | |
command: tail -F /dev/null | |
networks: | |
- esnet | |
pclient2: | |
image: myesclient:latest | |
container_name: pclient2 | |
command: tail -F /dev/null | |
depends_on: | |
- pclient1 | |
networks: | |
- esnet | |
networks: | |
esnet: | |
volumes: | |
esdata1: | |
driver: local | |
esdata2: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment