Sign inSign up

halklenson/gothinkdb

By halklenson

•Updated about 1 month ago

GoThinkDB - RethinkDB compatible database in Go

Image
0

734

halklenson/gothinkdb repository overview

⁠GoThinkDB Docker Images

⁠Quick Start

⁠Standalone (Single Node)
docker run -d \
  --name gothinkdb \
  -p 28015:28015 \
  -p 8080:8080 \
  -p 29015:29015 \
  -v gothinkdb-data:/data/gothinkdb \
  halklenson/gothinkdb:latest

Or with Docker Compose:

docker compose up -d

Access the dashboard at: http://localhost:8080⁠

Default credentials: admin / admin

⁠Cluster (3 Nodes)
docker compose -f docker-compose.cluster.yml up -d

This starts a 3-node cluster:

⁠Ports

PortDescription
28015ReQL Driver Protocol
8080HTTP Admin Dashboard & API
29015Cluster Communication

⁠Environment Variables

VariableDescriptionDefault
GOTHINKDB_SERVER_NAMEServer nameauto-generated

⁠Command Line Options

FlagDescriptionDefault
-dataData directory/data/gothinkdb
-driver-addressDriver protocol address:28015
-http-addressHTTP admin address:8080
-cluster-addressCluster communication address:29015
-joinAddress of existing cluster node to join(none)
-server-nameServer nameauto-generated

⁠Examples

⁠Join an existing cluster
docker run -d \
  --name gothinkdb-node2 \
  -p 28016:28015 \
  -p 8081:8080 \
  -p 29016:29015 \
  -v gothinkdb-node2-data:/data/gothinkdb \
  halklenson/gothinkdb:latest \
  -data /data/gothinkdb \
  -driver-address :28015 \
  -http-address :8080 \
  -cluster-address :29015 \
  -join gothinkdb-node1:29015 \
  -server-name gothinkdb-node2
⁠Custom data directory
docker run -d \
  --name gothinkdb \
  -p 28015:28015 \
  -p 8080:8080 \
  -v /my/data/path:/data/gothinkdb \
  halklenson/gothinkdb:latest

⁠Health Check

curl http://localhost:8080/api/health

⁠Drivers

Connect using any ReQL-compatible driver:

⁠TypeScript/JavaScript
import { connect } from 'gothinkdb-driver';

const conn = await connect({
  host: 'localhost',
  port: 28015
});
⁠Go
import "github.com/leandroasilva/gothinkdb/drivers/go"

conn, err := gothinkdb.Connect("localhost:28015")
⁠Rust
use gothinkdb::Connection;

let conn = Connection::connect("localhost:28015").await?;

⁠License

Apache 2.0

⁠Source Code

https://github.com/leandroasilva/gothinkdb⁠

Tag summary

Content type

Image

Digest

sha256:6d6a3639e…

Size

8.4 MB

Last updated

about 1 month ago

docker pull halklenson/gothinkdb