DBCTL is a tool designed to make running a database in a Docker container easy and fast. It offers the following features:
- Run a database with applied migration files and sample data.
- Access the connection URL and use your preferred tools to connect to the database.
- Launch a user interface (UI) for managing the database, if available.
- Enable users to quickly run tests in a fresh database.
- Cleanup databases once you're finished using them!
DBCTL is not intended for running databases in production. Its primary purpose is to simplify testing and practice with no hassle.
To install dbctl
from it source:
go install github.com/mirzakhany/dbctl@latest
docker run -lt --rm -v /var/run/docker.sock:/var/run/docker.sock dbctl:latest /dbctl [options] [args]
Note: in none root installation of docker docker.sock
is in $HOME/.docker/run/docker.sock
You can also download a prebuilt binary from releases page!
Please Check the docs for usage.
- Setup and run postgres database
- Setup and run redis
- A web base UI for Postgres
- Setup and run MongoDB
- Support lua lang for redis in fixtures and migration scripts
- Support for js in fixtures and migration scripts
- Utilize golang templates to generate sample data.
- API server to let clients create databases
- Golang client
- Python client (in progress)PR
- JS client
We welcome any and all contributions! Here are some ways you can get started:
- Report bugs: If you encounter any bugs, please let us know. Open up an issue and let us know the problem.
- Contribute code: If you are a developer and want to contribute, follow the instructions below to get started!
- Suggestions: If you don't want to code but have some awesome ideas, open up an issue explaining some updates or improvements you would like to see!
- Documentation: If you see the need for some additional documentation, feel free to add some!
- Fork this repository
- Clone the forked repository
- Add your contributions (code or documentation)
- Commit and push
- Wait for pull request to be merged
JetBrains generously granted me a year of their open-source support licenses to work on this project.