Sign inSign up

sergdudko/tabellum-worker

By sergdudko

•Updated 4 days ago

Tabellum, the database client, in your browser: its web app and engine, on a server of yours.

Image
Networking
Developer tools
Databases & storage
0

247

sergdudko/tabellum-worker repository overview

⁠Tabellum worker

Tabellum⁠ is a database client for PostgreSQL, MySQL/MariaDB, SQL Server, BigQuery, SQLite, and MongoDB — on macOS, Windows, Linux, iOS, and Android, and in a browser. This image is the browser's half: Tabellum's engine as a service. It serves the web app at / and opens the database connections a browser cannot.

  • Tables, queries in tabs, a schema designer, diagrams, dashboards, query plans, and schema compare.
  • Every statement is classified by the engine's own SQL parser, and a read-only connection is enforced in the engine and, where the database allows, by the database itself.
  • SSH and WireGuard tunnels inside the container — no root, no system VPN.
  • Backups with pg_dump and mysqldump (both in the image) and the engine's own export.
  • Managed connections: databases you hand out without handing out their passwords.

Your server, your network, your token. There is no Tabellum cloud: the browser talks to this container, and the container to your databases.

⁠Run it

docker run -d --name tabellum-worker \
  -p 8788:8788 \
  -e TABELLUM_WORKER_TOKEN=<at least 32 random characters> \
  -v tabellum-data:/data \
  {{IMAGE}}:latest

Open http://localhost:8788 and give the app the token once. Without TABELLUM_WORKER_TOKEN, the worker makes a token at start and prints a link that carries it (docker logs tabellum-worker). Put a TLS reverse proxy in front for anything beyond a LAN.

⁠On your own computer, without a token
docker run -d --name tabellum-worker \
  -p 127.0.0.1:8788:8788 \
  -e TABELLUM_WORKER_AUTH=none \
  -v tabellum-data:/data \
  {{IMAGE}}:latest

The worker then answers only localhost and pages of its own origin, so keep the port on 127.0.0.1.

⁠A managed database in one compose file

The worker with a demo PostgreSQL as a read-only managed connection, the license key on the worker, and no token. Nothing to create beside the file: the connection is written into it, and the workspace lives in a volume. Save it as compose.yaml, then:

export TABELLUM_LICENSE_KEY='TABL1.…'   # or that line in .env beside the file
docker compose up -d                     # then open http://localhost:8788
# Tabellum in a browser on this computer, with a database the worker manages
# (https://tabellum.dudko.dev/#compose). Nothing to create beside this file:
# the connection is written below, your key comes from the environment, and
# the workspace lives in a Docker volume.
#
#   export TABELLUM_LICENSE_KEY='TABL1.…'   # or that line in .env beside this file
#   docker compose up -d
#   open http://localhost:8788
#
# The browser shows Shop locked: it browses and queries, never sees the
# password, and cannot point the connection anywhere else.
name: tabellum

services:
  # The demo shop on PostgreSQL 16 (an invented store) with a read-only login,
  # `reader`. For a database of your own, change host, port, database, and
  # user in the connection below and the password under the worker, then
  # drop this service and the worker's depends_on.
  shop-db:
    image: ghcr.io/dudko-dev/tabellum-test-postgres:latest
    volumes:
      - shop-data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD", "pg_isready", "-h", "127.0.0.1", "-d", "shop"]
      interval: 2s
      retries: 60

  worker:
    image: ghcr.io/dudko-dev/tabellum-worker:latest
    depends_on:
      shop-db:
        condition: service_healthy
    ports:
      # This computer only: that is what lets the worker run without a token.
      - "127.0.0.1:8788:8788"
    environment:
      TABELLUM_WORKER_AUTH: none
      # Unset, the app asks for the key instead.
      TABELLUM_LICENSE_KEY: ${TABELLUM_LICENSE_KEY:-}
      TABELLUM_MANAGED_DIR: /managed
      # Answers {secret: shop/password}. A real password belongs in a Docker
      # secret or Vault: an environment variable shows in `docker inspect`.
      TABELLUM_SECRET_SHOP_PASSWORD: reader
    configs:
      - source: shop
        target: /managed/connections/shop.yaml
    volumes:
      - workspace:/data

configs:
  shop:
    content: |
      id: 01JC5M00000000000000000001
      name: Shop
      driver: postgres
      host: shop-db
      port: 5432
      database: shop
      user: reader
      password: {secret: shop/password}
      tls: {mode: disable}
      readOnly: true

volumes:
  shop-data:
  workspace:

People see Shop locked: they browse and query it, never see its password, and cannot point it anywhere else; a write is refused, since the connection is read-only. For a database of your own, change the connection under configs and its password, and drop shop-db. The same file is on tabellum.dudko.dev/#compose⁠.

⁠Environment

VariableDefaultPurpose
TABELLUM_WORKER_TOKENmade at startThe bearer token every request presents; at least 32 characters.
TABELLUM_WORKER_AUTHtokennone for a worker on your own computer (above).
TABELLUM_LICENSE_KEYunsetA TABL1.… key the worker hands to the apps it serves.
TABELLUM_WORKSPACE/data/workspaceThe workspace: connections, queries, designs, and dashboards as plain files.
TABELLUM_GIT_URLunsetKeep the workspace a clone of this repository, pulled every few minutes. TABELLUM_GIT_TOKEN for a private one.
TABELLUM_MANAGED_DIRunsetA read-only folder of managed connections/ and tunnels/.
TABELLUM_SECRET_<NAME>_<FIELD>unsetA value for a managed file's {secret: <name>/<field>}. Mounted files under TABELLUM_SECRETS_DIR (/run/secrets) and HashiCorp Vault (VAULT_ADDR) work too.
TABELLUM_WORKER_LISTEN:8788The address to listen on.

Passwords people type stay in their browser's encrypted vault and reach the worker only inside the authenticated connection; the worker keeps none on disk.

⁠The image

Port8788/tcp, plain HTTP
Volume/data, owned by user 10001
Platformlinux/amd64
Tagsthe version (0.4.1), latest, and the commit
HealthGET /healthz
Same imageghcr.io/dudko-dev/tabellum-worker

⁠License

Proprietary. Connecting to a database takes a Tabellum license key: free, by email, at tabellum.dudko.dev⁠, for personal, non-commercial use. For anything else, write to [email protected]⁠.

Tag summary

Content type

Image

Digest

sha256:439322d7e…

Size

112.7 MB

Last updated

4 days ago

docker pull sergdudko/tabellum-worker