Skip to content

Instantly share code, notes, and snippets.

@codefever
Created August 24, 2019 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codefever/f67a1cb07b274f948b8356debd43a003 to your computer and use it in GitHub Desktop.
Save codefever/f67a1cb07b274f948b8356debd43a003 to your computer and use it in GitHub Desktop.
Set up 3 nodes for CockroachDB cluster with Docker-Compose
version: "3"
services:
roach0:
image: cockroachdb/cockroach
container_name: roach0
command: start --logtostderr --insecure
ports:
- "26257:26257"
- "8080:8080"
networks:
- roach
volumes:
- ./data/roach0:/cockroach/cockroach-data
roach1:
image: cockroachdb/cockroach
container_name: roach1
command: start --logtostderr --insecure --join=roach0
depends_on:
- roach0
ports:
- "26258:26257"
- "8081:8080"
networks:
- roach
volumes:
- ./data/roach1:/cockroach/cockroach-data
roach2:
image: cockroachdb/cockroach
container_name: roach2
command: start --logtostderr --insecure --join=roach0
depends_on:
- roach0
ports:
- "26259:26257"
- "8083:8080"
networks:
- roach
volumes:
- ./data/roach2:/cockroach/cockroach-data
networks:
roach:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment