Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions public/svgs/surrealdb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions templates/compose/surrealdb-tikv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# documentation: https://surrealdb.com/docs/deployment/tikv
# slogan: SurrealDB with TiKV backend for distributed, highly available storage.
# category: database
# tags: database, nosql, relational, graph, multi-model, distributed
# logo: svgs/surrealdb.svg
# port: 8000

services:
pd:
image: pingcap/pd:latest
command:
- --name=pd
- --client-urls=http://0.0.0.0:2379
- --peer-urls=http://0.0.0.0:2380
- --initial-cluster=pd=http://0.0.0.0:2380
- --data-dir=/data
volumes:
- pd-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:2379/pd/api/v1/health"]
interval: 10s
timeout: 5s
retries: 5

tikv:
image: pingcap/tikv:latest
command:
- --addr=0.0.0.0:20160
- --status-addr=0.0.0.0:20180
- --pd=pd:2379
- --data-dir=/data
depends_on:
pd:
condition: service_healthy
volumes:
- tikv-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:20180/status"]
interval: 10s
timeout: 5s
retries: 5

surrealdb:
image: surrealdb/surrealdb:latest
command: start --user ${SERVICE_USER_SURREALDB:-root} --pass ${SERVICE_PASSWORD_SURREALDB:-root} --bind 0.0.0.0:8000 tikv://pd:2379
environment:
- SERVICE_FQDN_SURREALDB
- SERVICE_USER_SURREALDB=${SERVICE_USER_SURREALDB:-root}
- SERVICE_PASSWORD_SURREALDB=${SERVICE_PASSWORD_SURREALDB:-root}
depends_on:
tikv:
condition: service_healthy
healthcheck:
test: ["CMD", "surreal", "isready", "--conn", "http://localhost:8000"]
interval: 10s
timeout: 5s
retries: 5
22 changes: 22 additions & 0 deletions templates/compose/surrealdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# documentation: https://surrealdb.com/docs
# slogan: SurrealDB is an innovative NewSQL cloud database, suitable for serverless applications, jamstack apps, and distributed systems.
# category: database
# tags: database, nosql, relational, graph, multi-model
# logo: svgs/surrealdb.svg
# port: 8000

services:
surrealdb:
image: surrealdb/surrealdb:latest
command: start --user ${SERVICE_USER_SURREALDB:-root} --pass ${SERVICE_PASSWORD_SURREALDB:-root} --bind 0.0.0.0:8000 file:/mydata/surreal.db
environment:
- SERVICE_FQDN_SURREALDB
- SERVICE_USER_SURREALDB=${SERVICE_USER_SURREALDB:-root}
- SERVICE_PASSWORD_SURREALDB=${SERVICE_PASSWORD_SURREALDB:-root}
volumes:
- surrealdb-data:/mydata
healthcheck:
test: ["CMD", "surreal", "isready", "--conn", "http://localhost:8000"]
interval: 10s
timeout: 5s
retries: 5
Loading