Created
March 9, 2022 16:49
-
-
Save vuthaihoc/84213b777c5b32d5488bc058ed9126d5 to your computer and use it in GitHub Desktop.
Run cockroachdb cluster with docker
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: | |
crdb1: | |
image: cockroachdb/cockroach:v21.2.6 | |
ports: | |
# - "26257:26257" | |
- "8889:8080" | |
command: start --certs-dir=/cockroach/certs --join crdb1,crdb2,crdb3 --accept-sql-without-tls --store=path=/cockroach/cockroach-data,size=1G --listen-addr=crdb1 | |
volumes: | |
- ./certs:/cockroach/certs | |
- ./db1:/cockroach/cockroach-data | |
networks: | |
app_net: | |
crdb2: | |
image: cockroachdb/cockroach:v21.2.6 | |
# ports: | |
# - "26257:26257" | |
# - "8889:8080" | |
command: start --certs-dir=/cockroach/certs --join crdb1,crdb2,crdb3 --accept-sql-without-tls --store=path=/cockroach/cockroach-data,size=1G --listen-addr=crdb2 | |
volumes: | |
- ./certs:/cockroach/certs | |
- ./db2:/cockroach/cockroach-data | |
networks: | |
app_net: | |
crdb3: | |
image: cockroachdb/cockroach:v21.2.6 | |
# ports: | |
# - "26257:26257" | |
# - "8889:8080" | |
command: start --certs-dir=/cockroach/certs --join crdb1,crdb2,crdb3 --accept-sql-without-tls --store=path=/cockroach/cockroach-data,size=1G --listen-addr=crdb3 | |
volumes: | |
- ./certs:/cockroach/certs | |
- ./db3:/cockroach/cockroach-data | |
networks: | |
app_net: | |
networks: | |
app_net: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment