Sign inSign up

bladepipe/cgdm-console

By bladepipe

•Updated about 13 hours ago

Free open-source DB tool: access control, data masking, SQL audit, CI/CD, cross-region deployment.

Image
Security
Integration & delivery
Developer tools
0

4.8K

bladepipe/cgdm-console repository overview

⁠CloudDM Console

CloudDM Console is the control-plane component in CloudDM cluster mode. It is suitable for team collaboration, multi-node access, and cross-network-region deployment. A working MySQL instance is required before startup.

[Website⁠] [Documentation⁠] [Blog⁠] [Gitee⁠] [GitHub⁠]

⁠What Is CloudDM

CloudDM is a free and open-source database management platform designed for team collaboration scenarios. It provides access control, data masking, SQL auditing, CI/CD, and cross-region deployment capabilities.

It is not just a SQL query tool, and it is not just a database operations platform. It brings the following capabilities into one web product:

  • Unified management for multiple databases and data sources
  • Visual interfaces for query, object management, and daily operations
  • Audit, risk validation, and approval workflows before SQL execution
  • Access control through roles, resources, and temporary authorization
  • Database access deployment closer to database networks through the Console + Sidecar architecture

If you need a database platform that can be adopted directly rather than a lightweight command-line client, CloudDM is a better fit.

⁠Core Capabilities

⁠Query and Development
  • Supports MySQL, Oracle, MariaDB, PostgreSQL, SQL Server, DB2, TiDB, ClickHouse, Doris, StarRocks, Redis, MongoDB, and more
  • Provides a unified web console, SQL editor, result export, execution plans, transaction control, and syntax highlighting
⁠Database Management
  • Supports management of catalogs, schemas, tables, columns, indexes, views, functions, stored procedures, triggers, users, and roles
  • Suitable for unified management across multiple environments and instances
⁠Database CI/CD
  • Supports Git Push, Web Hook, and HttpCall as CI/CD triggers
  • Supports Gitee as a change repository
⁠Security and Permissions
  • Supports both resource permissions and functional permissions
  • Supports permission requests, grants, temporary authorization, and approval workflows
  • Provides SQL auditing, risk interception, and data masking capabilities
⁠Workflow and Collaboration
  • Supports SQL audit workflows, permission tickets, and change workflows
  • Supports manual, immediate, and scheduled execution modes
  • Supports OpenLDAP, OIDC, Windows AD, DingTalk, Feishu, and WeCom integrations for authentication and workflow engines
  • Suitable as a shared database access entry point and operating standard for teams

⁠License

CloudDM uses the business-friendly Apache 2.0 license.

⁠Usage

Console depends on MySQL. The simplest way is to use Docker Compose to start MySQL and Console together in one step.

Example compose file:

services:
  dm_mysql:
    image: mysql:8.0
    container_name: cgdm-mysql
    restart: always
    volumes:
      - cgdm_mysql_data:/var/lib/mysql
    environment:
      MYSQL_DATABASE: cdmgr
      MYSQL_ROOT_PASSWORD: 123456
    command: ["mysqld", "--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci"]

  dm_console:
    image: bladepipe/cgdm-console:3.0.7
    container_name: cgdm-console
    restart: always
    depends_on:
      - dm_mysql
    ports:
      - "8222:8222"
      - "8008:8008"
    volumes:
      - cgdm_console_conf:/root/cgdm/console/conf
      - cgdm_console_logs:/root/cgdm/console/logs
      - cgdm_console_data:/root/cgdm/console/data
    environment:
      APP_WEB_PORT: 8222
      APP_WEB_JWT: "change_me_to_a_random_secret"
      APP_SERVE_NAME: dm_console
      APP_SERVE_PORT: 8008
      # 
      DB_HOST: dm_mysql
      DB_PORT: 3306
      DB_DATABASE: cdmgr
      DB_USERNAME: root
      DB_PASSWORD: 123456

volumes:
  cgdm_console_conf:
  cgdm_console_logs:
  cgdm_console_data:
  cgdm_mysql_data:

Save it as docker-compose.yml, then start it with:

docker compose -f docker-compose.yml up -d

For mainland China network environments, you can switch the image to the accelerated registry address:

image: cloudcanal-registry.cn-shanghai.cr.aliyuncs.com/clougence/cgdm-console:3.0.7

After startup, open:

http://localhost:8222

On first access, the initialization wizard opens. The default account is [email protected]

⁠Environment Variables

⁠General Startup Parameters
Environment VariableDefaultPurpose
APP_WEB_PORT8222Web console port, mapped to server.port
APP_WEB_JWTBuilt-in image defaultJWT secret. Use a long random string explicitly in production
APP_SERVE_NAME127.0.0.1Hostname or address exposed by Console to Sidecar
APP_SERVE_PORT8008Console communication port exposed to Sidecar
WAIT_DB_TIMEOUT_SECONDS120Maximum number of seconds to wait for database connectivity during startup

What should APP_SERVE_NAME be set to

  • If Sidecar and Console are in the same Docker network, use the service name or another resolvable address, such as dm_console in the compose example
  • If Sidecar is deployed on a different host, use the host IP, load balancer address, or domain name
  • If Sidecar accesses Console through a reverse proxy or layer-4 load balancer, use the proxied reachable address
  • Do not mechanically keep the default value 127.0.0.1, because it only works for container-local self-connections and not for an independent Sidecar
⁠Database Parameters
Environment VariableDefaultPurpose
DB_HOSTEmptyMySQL host address. Must be set explicitly
DB_PORT3306MySQL port
DB_DATABASEcdmgrMetadata database name
DB_USERNAMEEmptyMySQL username. Must be set explicitly
DB_PASSWORDEmptyMySQL password. It is recommended to set this explicitly

⁠Data Volumes

Container PathRecommended Host PathDescription
/var/lib/mysql/data/cgdm-console/mysqlStores MySQL data, important
/root/cgdm/console/conf/data/cgdm-console/confConfiguration directory containing console.properties, important
/root/cgdm/console/data/data/cgdm-console/dataRuntime data directory, important
/root/cgdm/console/logs/data/cgdm-console/logsLog directory

⁠Port Description

Container PortPurposeRequired Mapping
8222Web consoleYes
8008Communication port between Sidecar and ConsoleYes

If Sidecar is not on the same host, 8008 must be reachable from the Sidecar network.

⁠Important Rule

Console generates configuration from environment variables only when /root/cgdm/console/conf/console.properties does not exist.

Tag summary

Content type

Image

Digest

sha256:36036a84d…

Size

582.1 MB

Last updated

about 13 hours ago

docker pull bladepipe/cgdm-console