From 73fbf58615f6eaad6b0c1617eab5c24b69b5e104 Mon Sep 17 00:00:00 2001 From: Nenad Ilic Date: Fri, 13 Feb 2026 21:01:52 +0000 Subject: [PATCH] feat(service): add SurrealDB service templates (RocksDB + TiKV) Add two one-click service templates for SurrealDB: - surrealdb.yaml: standalone instance with RocksDB storage backend - surrealdb-with-tikv.yaml: distributed setup with TiKV (PD + TiKV + SurrealDB) Both templates include persistent volumes, health checks using surreal isready, and auto-generated root credentials via SERVICE_PASSWORD_SURREALDB. Resolves #7642 --- public/svgs/surrealdb.svg | 53 ++++++++++++++++++++++ templates/compose/surrealdb-with-tikv.yaml | 53 ++++++++++++++++++++++ templates/compose/surrealdb.yaml | 20 ++++++++ 3 files changed, 126 insertions(+) create mode 100644 public/svgs/surrealdb.svg create mode 100644 templates/compose/surrealdb-with-tikv.yaml create mode 100644 templates/compose/surrealdb.yaml diff --git a/public/svgs/surrealdb.svg b/public/svgs/surrealdb.svg new file mode 100644 index 000000000..e7d99d805 --- /dev/null +++ b/public/svgs/surrealdb.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/compose/surrealdb-with-tikv.yaml b/templates/compose/surrealdb-with-tikv.yaml new file mode 100644 index 000000000..bb29689a0 --- /dev/null +++ b/templates/compose/surrealdb-with-tikv.yaml @@ -0,0 +1,53 @@ +# documentation: https://surrealdb.com/docs/surrealdb/installation/running/docker +# slogan: SurrealDB with TiKV distributed storage backend for production workloads. +# category: database +# tags: surrealdb, database, multi-model, tikv, distributed, production +# logo: svgs/surrealdb.svg +# port: 8000 + +services: + surrealdb: + image: surrealdb/surrealdb:v2.6.1 + command: start --user root --pass ${SERVICE_PASSWORD_SURREALDB} tikv://pd:2379 + environment: + - SERVICE_URL_SURREALDB_8000 + depends_on: + tikv: + condition: service_healthy + healthcheck: + test: ["CMD", "surreal", "isready", "--endpoint", "http://127.0.0.1:8000"] + interval: 5s + timeout: 20s + retries: 10 + pd: + image: pingcap/pd:v8.5.5 + command: + - --name=pd + - --client-urls=http://0.0.0.0:2379 + - --peer-urls=http://0.0.0.0:2380 + - --data-dir=/data + - --initial-cluster=pd=http://pd:2380 + volumes: + - pd-data:/data + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:2379/health || exit 1"] + interval: 5s + timeout: 20s + retries: 10 + tikv: + image: pingcap/tikv:v8.5.5 + command: + - --addr=0.0.0.0:20160 + - --advertise-addr=tikv:20160 + - --pd-endpoints=http://pd:2379 + - --data-dir=/data + volumes: + - tikv-data:/data + depends_on: + pd: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:20180/status || exit 1"] + interval: 10s + timeout: 20s + retries: 10 diff --git a/templates/compose/surrealdb.yaml b/templates/compose/surrealdb.yaml new file mode 100644 index 000000000..cbe4b5e70 --- /dev/null +++ b/templates/compose/surrealdb.yaml @@ -0,0 +1,20 @@ +# documentation: https://surrealdb.com/docs/surrealdb/installation/running/docker +# slogan: A scalable, distributed, collaborative, document-graph database for the realtime web. +# category: database +# tags: surrealdb, database, multi-model, sql, nosql, graph, realtime +# logo: svgs/surrealdb.svg +# port: 8000 + +services: + surrealdb: + image: surrealdb/surrealdb:v2.6.1 + command: start --user root --pass ${SERVICE_PASSWORD_SURREALDB} rocksdb:///data + environment: + - SERVICE_URL_SURREALDB_8000 + volumes: + - surrealdb-data:/data + healthcheck: + test: ["CMD", "surreal", "isready", "--endpoint", "http://127.0.0.1:8000"] + interval: 5s + timeout: 20s + retries: 10