2026-05-24 16:17:45 +00:00
2026-05-24 16:17:45 +00:00
2026-05-24 16:17:45 +00:00
2026-05-24 16:17:45 +00:00
2026-05-24 16:17:45 +00:00
2026-05-24 16:17:45 +00:00

@lossless.zone/database

MongoDB-compatible database container with a management UI, powered by @push.rocks/smartdb.

Features

  • MongoDB wire-protocol endpoint using SmartDB
  • File-backed persistence under /data/smartdb
  • SCRAM-authenticated root user and tenant users
  • Tenant provisioning with isolated database/user pairs
  • Admin UI for status, connection info, tenants, collections, and oplog
  • Health and metrics endpoints for container orchestration
  • Single Docker image with Deno runtime

Quick Start

docker run -d \
  --name database \
  -p 27017:27017 \
  -p 3000:3000 \
  -v databasedata:/data \
  -e DBST_ROOT_PASSWORD=change-root-password \
  -e DBST_ADMIN_PASSWORD=change-admin-password \
  code.foss.global/lossless.zone/database:latest

Open http://localhost:3000 and sign in with username admin and DBST_ADMIN_PASSWORD.

Development

pnpm install
pnpm run build
deno run --allow-all mod.ts server --ephemeral

Configuration

Variable Description Default
DBST_PORT MongoDB wire-protocol port 27017
DBST_UI_PORT Management UI port 3000
DBST_STORAGE_DIR Persistent storage directory /data
DBST_PUBLIC_HOST Hostname shown in connection strings 127.0.0.1
DBST_ROOT_USERNAME Root database username root
DBST_ROOT_PASSWORD Root database password admin
DBST_ADMIN_PASSWORD Admin UI password admin
DBST_AUTH_ENABLED Enable SmartDB auth true
DBST_ALLOW_INSECURE_DEFAULTS Allow default credentials on /data false

Persistent /data refuses default root/admin passwords unless DBST_ALLOW_INSECURE_DEFAULTS=true is set for disposable development.

CLI

deno run --allow-all mod.ts server [options]

Options:
  --ephemeral
  --database-port PORT
  --ui-port PORT
  --storage-dir DIR
  --public-host HOST
  --root-username USER
  --root-password PASS
  --admin-password PASS
  --disable-auth

Endpoints

  • GET /livez liveness
  • GET /readyz readiness
  • GET /healthz JSON health details
  • GET /metrics Prometheus-style metrics
  • POST /typedrequest authenticated management API

Testing

pnpm run build
pnpm test

Optional Docker smoke test:

pnpm run test:docker

This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the license file.

For reporting bugs, issues, or security vulnerabilities, please visit community.foss.global/.

S
Description
No description provided
Readme 2.7 MiB
Languages
TypeScript 97.1%
Dockerfile 1.7%
HTML 1.2%