8000 GitHub - AnkanSaha/ContainDB: ContainDB is a Go-based CLI tool that automates the installation and management of popular database containers (MongoDB, Redis, MySQL, PostgreSQL, Cassandra) and PHPMyAdmin.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ContainDB is a Go-based CLI tool that automates the installation and management of popular database containers (MongoDB, Redis, MySQL, PostgreSQL, Cassandra) and PHPMyAdmin.

License

Notifications You must be signed in to change notification settings

AnkanSaha/ContainDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ContainDB

ContainDB is a CLI tool written in Go that automates the installation and management of popular database containers (MongoDB, Redis, MySQL, PostgreSQL, Cassandra) as well as PHPMyAdmin and MongoDB Compass. It handles Docker installation (if missing), network setup, container orchestration, optional port mapping, restart policies, and data persistence.


Features

  • ✅ Automatic Docker installation and setup
  • 🌐 Dedicated Docker network (ContainDB-Network) for seamless inter-container communication
  • 📦 Pulls and runs database images with sensible defaults
  • 🔌 Interactive prompts for:
    • Port mapping (default or custom)
    • Auto-restart policies
    • Environment variables for credentials
    • Volume persistence and management
  • 🔗 One-click PHPMyAdmin linking to existing SQL containers
  • 🧭 Optional MongoDB Compass download and install

Prerequisites

  • Linux or macOS (with Bash)
  • Internet connection to download Docker images

Installation

Option 1: Download and install via Debian package

# download latest .deb from Releases
wget https://github.com/AnkanSaha/ContainDB/releases/download/v3.11.17-beta/containDB_3.11.17-beta_amd64.deb

# install the package
sudo dpkg -i containDB_3.11.17-beta_amd64.deb

Option 2: Build from source

# clone the reposito
8000
ry
git clone https://github.com/AnkanSaha/ContainDB.git
cd ContainDB

# build the CLI
./Scripts/BinBuilder.sh

# install binary to /usr/local/bin
sudo mv ./bin/containDB /usr/local/bin/

Quick Start

Run the CLI with root privileges:

sudo containDB
  1. Welcome Banner – Displays version and basic info.
  2. Main Menu – Choose one of:
    • Install Database
    • List Databases
    • Remove Database
    • Exit
  3. Follow Prompts – Configure and launch containers in a few keystrokes.

Usage Examples

1. Install a Database

sudo containDB
# Select "Install Database"
# Pick "mysql" (or any supported service)
# Answer port mapping, restart policy, persistence, credentials

2. Launch PHPMyAdmin

sudo containDB
# Select "Install Database"
# Choose "phpmyadmin"
# Pick an existing SQL container and assign host port

3. Install MongoDB Compass

sudo containDB
# Select "Install Database"
# Choose "MongoDB Compass"

4. List Running Containers

sudo containDB --version
sudo containDB
# Select "List Databases"

5. Remove a Database

sudo containDB
# Select "Remove Database"
# Pick the container to delete (with optional volume cleanup)

Flags

  • --version : Print ContainDB CLI version and exit.

Troubleshooting

  • Permission Denied
    Ensure you run with sudo.
  • Docker Not Found
    The CLI auto-installs Docker on first run; please restart your terminal after installation.
  • Port Already in Use
    Choose a different host port when prompted.
  • Volume Conflicts
    On existing volumes, you can opt to reuse or recreate fresh ones.

Contributing

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/…)
  3. Commit your changes (git commit -m 'Add …')
  4. Push to the branch (git push origin feature/…)
  5. Open a Pull Request

License

This project is licensed under the MIT License. See LICENSE for details.

About

ContainDB is a Go-based CLI tool that automates the installation and management of popular database containers (MongoDB, Redis, MySQL, PostgreSQL, Cassandra) and PHPMyAdmin.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0