Last active
March 29, 2019 00:23
-
-
Save pyar6329/83a821da0891c29e05d5103818fc41d5 to your computer and use it in GitHub Desktop.
CockroachDB 4 clusters
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: '3.7' | |
services: | |
cockroach1: | |
image: cockroachdb/cockroach:v2.1.6 | |
container_name: sample-cockroach-1 | |
command: start --insecure | |
networks: | |
sample: | |
aliases: | |
- sample-cockroach-1 | |
volumes: | |
- ./docker/var/cockroach/data1:/cockroach/cockroach-data | |
ports: | |
- "26257:26257" | |
- "8080:8080" | |
cockroach2: | |
image: cockroachdb/cockroach:v2.1.6 | |
container_name: sample-cockroach-2 | |
depends_on: | |
- cockroach1 | |
command: start --insecure --join=sample-cockroach-1 | |
healthcheck: | |
test: ["CMD-SHELL", "curl -sL http://localhost:8080/health || exit 1"] | |
interval: 60s | |
timeout: 5s | |
retries: 3 | |
start_period: 30s | |
networks: | |
sample: | |
aliases: | |
- sample-cockroach-2 | |
volumes: | |
- ./docker/var/cockroach/data2:/cockroach/cockroach-data | |
cockroach3: | |
image: cockroachdb/cockroach:v2.1.6 | |
container_name: sample-cockroach-3 | |
depends_on: | |
- cockroach1 | |
command: start --insecure --join=sample-cockroach-1 | |
healthcheck: | |
test: ["CMD-SHELL", "curl -sL http://localhost:8080/health || exit 1"] | |
interval: 60s | |
timeout: 5s | |
retries: 3 | |
start_period: 30s | |
networks: | |
sample: | |
aliases: | |
- sample-cockroach-3 | |
volumes: | |
- ./docker/var/cockroach/data3:/cockroach/cockroach-data | |
cockroach4: | |
image: cockroachdb/cockroach:v2.1.6 | |
container_name: sample-cockroach-4 | |
depends_on: | |
- cockroach1 | |
command: start --insecure --join=sample-cockroach-1 | |
healthcheck: | |
test: ["CMD-SHELL", "curl -sL http://localhost:8080/health || exit 1"] | |
interval: 60s | |
timeout: 5s | |
retries: 3 | |
start_period: 30s | |
networks: | |
sample: | |
aliases: | |
- sample-cockroach-4 | |
volumes: | |
- ./docker/var/cockroach/data4:/cockroach/cockroach-data | |
networks: | |
sample: |
Author
pyar6329
commented
Mar 29, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment