From da5e6c8bff738cfcf26064d9c66f952fe21524d0 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Wed, 21 Feb 2024 06:42:15 +0100 Subject: [PATCH] feat: add crdb Signed-off-by: kjuulh --- templates/docker-compose.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/templates/docker-compose.yaml b/templates/docker-compose.yaml index ba6e0f2..572dd2d 100644 --- a/templates/docker-compose.yaml +++ b/templates/docker-compose.yaml @@ -34,3 +34,17 @@ services: - NATS_ENABLE_AUTH=yes - NATS_USERNAME=user - NATS_PASSWORD=secret + + crdb: + restart: 'always' + image: 'cockroachdb/cockroach:latest' + command: 'start-single-node --advertise-addr 0.0.0.0 --insecure' + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/health?ready=1"] + interval: '10s' + timeout: '30s' + retries: 5 + start_period: '20s' + ports: + - '28080:8080' + - '26257:26257'