Created
August 9, 2023 20:49
-
-
Save nexdrew/1aa7537438dd90de049c98ee81ef03d8 to your computer and use it in GitHub Desktop.
docker compose config for simple 3-node insecure cockroach cluster
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" | |
services: | |
db1: | |
image: "cockroachdb/cockroach:v23.1.8" | |
container_name: db1 | |
hostname: db1 | |
restart: on-failure | |
ports: | |
- "26257:26257" | |
- "8080:8080" | |
volumes: | |
- "./test-data/db1:/cockroach/cockroach-data" | |
command: "start --insecure --join=db1,db2,db3" | |
networks: | |
- testnet | |
db2: | |
image: "cockroachdb/cockroach:v23.1.8" | |
container_name: db2 | |
hostname: db2 | |
restart: on-failure | |
volumes: | |
- "./test-data/db2:/cockroach/cockroach-data" | |
command: "start --insecure --join=db1,db2,db3" | |
networks: | |
- testnet | |
db3: | |
image: "cockroachdb/cockroach:v23.1.8" | |
container_name: db3 | |
hostname: db3 | |
restart: on-failure | |
volumes: | |
- "./test-data/db3:/cockroach/cockroach-data" | |
command: "start --insecure --join=db1,db2,db3" | |
networks: | |
- testnet | |
networks: | |
testnet: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment