Nomploy Nomad Packs

← All packs

dbgate v0.1.0

Dev tools

DBGate — a web-based database manager for MySQL, PostgreSQL, SQL Server, MongoDB, SQLite, Redis, and more in one GUI: browse and edit data, run queries, design tables, and export/import. Deployed as a host-networked Nomad service with a persistent volume for saved connections.

nomad-pack run dbgate --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- dbgate

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

1 task http 3023 1 volume image dbgate/dbgate:latest tracks :latest image bumped today
Variables 8
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run dbgate -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "dbgate"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The DBGate container image. Pin a tag in production.
image = "dbgate/dbgate:latest"

# Host port for the DBGate web UI (PORT).
port = 3023

# Named volume for DBGate data (/root/.dbgate): saved connections, queries, archives.
data_volume = "dbgate_data"

# Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# Resources for the DBGate task.
resources = {
    cpu    = 300
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"dbgate"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"dbgate/dbgate:latest"
The DBGate container image. Pin a tag in production.
port number
3023
Host port for the DBGate web UI (PORT).
data_volume string
"dbgate_data"
Named volume for DBGate data (/root/.dbgate): saved connections, queries, archives.
constraints list
[]
Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 300
    memory = 256
  }
Resources for the DBGate task.
Back up this pack

This pack stores data in one Docker named volume: dbgate_data

restic

# Run on the node hosting this pack. Point restic at your repo first:
#   export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>"
#   export RESTIC_PASSWORD="<repo-password>"
#   export AWS_ACCESS_KEY_ID=<key>  AWS_SECRET_ACCESS_KEY=<secret>
restic backup \
  /var/lib/docker/volumes/dbgate_data/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/dbgate_data/_data backup:<bucket>/dbgate_data

Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.

Readme

dbgate

DBGate — a web-based database manager for your whole team. One GUI for MySQL, PostgreSQL, SQL Server, MongoDB, SQLite, Redis, and more: browse and edit data, run and save queries, design tables, and export/import between databases.

Single host-networked Nomad service with a persistent volume for saved connections and queries.

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run dbgate --registry=nomploy

Configure

Variable Default Description
port 3023 Web UI port (PORT).
data_volume dbgate_data /root/.dbgate — saved connections, queries, archives.
image dbgate/dbgate:latest Container image. Pin a tag in production.
resources { cpu = 300, memory = 256 } Task resources.

Add connections from the web UI; co-located databases on the same node are reachable at 127.0.0.1. You can also predefine connections with CONNECTIONS / LABEL_* / SERVER_* env vars (see the DBGate docs). The UI is unauthenticated by default — keep it internal, front it with a reverse proxy, or set LOGIN / PASSWORD env vars to require a login. Pin the job to the node holding the volume with constraints.