Docker-compose files from NoSQL multi-node environments 😊
Last active
June 30, 2021 20:15
-
-
Save rafaeldalsenter/4ce0779cc927125ff24061791e9d2a33 to your computer and use it in GitHub Desktop.
NoSQL databases benchmark
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: | |
first-cassandra: | |
image: cassandra | |
hostname: first-cassandra | |
restart: on-failure | |
container_name: first-cassandra | |
expose: | |
- 9042 | |
ports: | |
- 9042:9042 | |
second-cassandra: | |
image: cassandra | |
hostname: second-cassandra | |
restart: on-failure | |
container_name: second-cassandra | |
expose: | |
- 9042 | |
ports: | |
- 9043:9042 | |
environment: | |
- CASSANDRA_SEEDS=first-cassandra | |
depends_on: | |
- first-cassandra | |
third-cassandra: | |
image: cassandra | |
hostname: third-cassandra | |
restart: on-failure | |
container_name: third-cassandra | |
expose: | |
- 9042 | |
ports: | |
- 9044:9042 | |
environment: | |
- CASSANDRA_SEEDS=second-cassandra | |
depends_on: | |
- second-cassandra |
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: | |
first-mongo: | |
hostname: first-mongo | |
container_name: first-mongo | |
image: mongo | |
expose: | |
- 27017 | |
ports: | |
- 27017:27017 | |
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0" ] | |
healthcheck: | |
test: test $$(echo "rs.initiate({_id:'rs0',members:[{_id:0,host:\"first-mongo:27017\"},{_id:1,host:\"second-mongo:27017\"},{_id:2,host:\"third-mongo:27017\"}]}).ok || rs.status().ok" | mongo --port 27017 --quiet) -eq 1 | |
interval: 10s | |
start_period: 30s | |
second-mongo: | |
hostname: second-mongo | |
container_name: second-mongo | |
image: mongo | |
expose: | |
- 27017 | |
ports: | |
- 27018:27017 | |
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0" ] | |
third-mongo: | |
hostname: third-mongo | |
container_name: third-mongo | |
image: mongo | |
expose: | |
- 27017 | |
ports: | |
- 27019:27017 | |
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment