DbGate is a web-based database administration tool included in the demo stack that provides unified access to all infrastructure services.
DbGate gives you web-based access to:
- PostgreSQL Databases: IAM, Billing, and Audit services
- Redis Cache: Session and cache storage
- RabbitMQ: Message queue management
- MinIO S3: Object storage browser
# Start the entire demo stack (includes DbGate)
docker compose -f compose.demo.yaml up -d
# Or on Windows PowerShell
docker compose -f compose.demo.yaml up -dDbGate runs internally on the foundation-network and is accessible via:
# Port forward to your local machine
docker exec -it foundation-dbgate sh
# Or configure Nginx to expose it (recommended)Recommended: Add DbGate to your Nginx configuration to access it via browser.
DbGate automatically includes connections for:
| Connection | Server | Port | Database | Username |
|---|---|---|---|---|
| PostgreSQL - IAM Service | foundation-postgres-iam | 5432 | iamservice | svc_iam_dba |
| PostgreSQL - Billing Service | foundation-postgres-billing | 5432 | billingservice | svc_billing_dba |
| PostgreSQL - Audit Service | foundation-postgres-audit | 5432 | auditservice | svc_audit_dba |
| PostgreSQL - CMS Service | foundation-postgres-cms | 5432 | cmsservice | svc_cms_dba |
| Connection | Server | Port |
|---|---|---|
| Redis - Cache | foundation-redis | 6379 |
| Connection | Server | Port | Username |
|---|---|---|---|
| RabbitMQ - Message Queue | foundation-rabbitmq | 15672 | svc_platform_rmq |
| Connection | Server | Port | Access Key |
|---|---|---|---|
| MinIO - S3 Object Storage | foundation-minio | 9000 | iqkv |
Configure credentials via .env file:
# PostgreSQL
IAM_DB_USERNAME=svc_iam_dba
IAM_DB_PASSWORD=svc_iam_dba
BILLING_DB_USERNAME=svc_billing_dba
BILLING_DB_PASSWORD=svc_billing_dba
AUDIT_DB_USERNAME=svc_audit_dba
AUDIT_DB_PASSWORD=svc_audit_dba
# RabbitMQ
RABBITMQ_USERNAME=svc_platform_rmq
RABBITMQ_PASSWORD=svc_platform_rmq
# MinIO
MINIO_ROOT_USER=iqkv
MINIO_ROOT_PASSWORD=iqkv_passwordEdit docker/dbgate/connections.jsonl to add custom database connections:
{
"_id": "custom-db",
"engine": "postgres@dbgate-plugin-postgres",
"server": "hostname",
"port": 5432,
"user": "username",
"password": "password",
"database": "dbname",
"displayName": "Custom Database"
}Supported engines:
postgres@dbgate-plugin-postgres- PostgreSQLredis@dbgate-plugin-redis- Redisrabbitmq@dbgate-plugin-rabbitmq- RabbitMQs3@dbgate-plugin-s3- S3-compatible storagemysql@dbgate-plugin-mysql- MySQLmariadb@dbgate-plugin-mariadb- MariaDBmongo@dbgate-plugin-mongo- MongoDB
- Open DbGate web interface
- Select "PostgreSQL - IAM Service" (or other service)
- Navigate through schemas and tables
- Query, export, or import data
- Select "Redis - Cache"
- Browse keys organized by pattern
- View, edit, or delete key values
- Select "RabbitMQ - Message Queue"
- View queues, exchanges, and bindings
- Monitor message rates and stats
- Select "MinIO - S3 Object Storage"
- Browse buckets and objects
- Upload, download, or delete files
- Development Only: DbGate configuration is intended for local development
- Credentials: Update default passwords in production environments
- Network: DbGate only accessible within
foundation-networkby default - Logins: Authentication is enabled (
LOGINS=1)
foundation-dbgate:
image: dbgate/dbgate:5.3.3
container_name: foundation-dbgate
environment:
WEB_ROOT: /
LOGINS: "1"
expose:
- "3000"
volumes:
- ./docker/dbgate/connections.jsonl:/root/.dbgate/connections.jsonl:ro
- foundation_dbgate_data:/root/.dbgate
networks:
- foundation-network# Check logs
docker logs foundation-dbgate
# Verify connections file exists
ls docker/dbgate/connections.jsonl
# Restart DbGate
docker restart foundation-dbgate# Verify database services are healthy
docker ps --filter name=foundation-postgres
docker ps --filter name=foundation-redis
docker ps --filter name=foundation-rabbitmq
docker ps --filter name=foundation-minio
# Check network connectivity
docker exec foundation-dbgate ping foundation-postgres-iam# Stop and remove DbGate
docker compose -f compose.demo.yaml stop foundation-dbgate
docker compose -f compose.demo.yaml rm -f foundation-dbgate
# Remove volume
docker volume rm foundation_dbgate_data
# Restart
docker compose -f compose.demo.yaml up -d foundation-dbgate- Query History: DbGate saves your SQL query history
- Export Data: Export tables as CSV, JSON, or SQL
- Import Data: Import data from various formats
- Schema Compare: Compare database schemas
- ER Diagrams: Visualize database relationships
- Dark Mode: Available in settings for easier viewing
For issues or questions, refer to the main README.md or open an issue in the repository.