Sign inSign up

nathanfirmo/dbgate

By nathanfirmo

•Updated 4 months ago

HTTP database gateway for test workflows

Image
Integration & delivery
0

504

nathanfirmo/dbgate repository overview

⁠dbgate

dbgate is a lightweight HTTP database gateway designed for local and CI test workflows. It exposes a small REST API that lets clients like curl, Hurl, test harnesses, and setup scripts execute SQL against MySQL and query or mutate MongoDB collections without embedding database drivers into those workflows.

⁠What it does

  • Execute MySQL statements over HTTP
  • Run MySQL queries and return JSON rows
  • Execute MongoDB operations like deleteMany, insertMany, updateOne, and updateMany
  • Query MongoDB collections and return JSON documents
  • Support multi-statement MySQL execution for test seeding
  • Run as a small standalone container for local development or Kubernetes test environments

⁠Main endpoints

  • GET /health
  • POST /exec
  • POST /query
  • POST /exec-file
  • POST /query-file

⁠Example use cases

  • Reset and seed test databases from Hurl or shell scripts
  • Run ad hoc setup queries from CI jobs
  • Provide a simple database gateway inside a local Kubernetes cluster
  • Load large SQL seed files through raw request bodies

⁠Configuration

dbgate can be configured using environment variables or a dbgate.yaml file. It supports multiple named database connections for:

  • MySQL
  • MongoDB

⁠Container usage

docker run --rm -p 9999:9999 \
  -v "$(pwd)/dbgate.yaml:/app/dbgate.yaml:ro" \
  nathanfirmo/dbgate:latest

## Important

dbgate has no authentication and is intended for local, development, and trusted internal test
environments only. Do not expose it publicly.

## Source

GitHub: https://github.com/NathanFirmo/dbgate
Documentation: https://github.com/NathanFirmo/dbgate#readme

Tag summary

Content type

Image

Digest

sha256:6b0487e6e…

Size

9.1 MB

Last updated

4 months ago

docker pull nathanfirmo/dbgate