A gui control microservice for parsing and executing arbitrary parts of a docker-compose file.
MIT License
Docker Compose Deploy Control (dcDeployControl) is a microservice that parses docker-compose.yml
files and dynamically creates a webinterface for deploying and visualizing containers and networks. The main purpose of the software is to create understandable visualizations over large docker composes aswell as managing execution of subsets of the docker-compose setup. Compared to a similar tool like WeaveScope, dcDeployControl does not require any priviliges and can create the visualizations without starting any containers. It does this by parsing the chosen docker-compose project and detecting containers, networks, port-forwarding and custom labels. The information is sent to frontend, where containers and networks are converted to nodes and edges in a network graph. The backend works as a wrapper for a DinD container wherefrom the frontend can get information about live running containers aswell as start and stopping containers defined in the chosen docker-compose file. The end-product is a neat, incredibly useful tool, compatible with any docker-compose managed project.
Checkout the demo gif below!
.env
file and change PROJECT_PATH="./example"
to whichever path your docker-compose project has.docker-compose up -d
.Note: The PROJECT_PATH
will be volumed, meaning that changing the docker-compose file does not require a restart of dcDeployControl.
A label system has been added that can help control the visualizations and other structure of the application. Below the added docker-compose labels that will be parsed on software execution are described. NOTE: These labels must be in a list .yml format!
labels:
- "global-ignore=<network-name>" # Global ignore specific network in the visualizations.
- "global-use-defaults=<bool>" # Global turn off or on the default group option.
- "group=<group-name>" # For this container set group, this will override network group detection.
- "network=<network-name>" # For this container set network, this will override network group detection.
- "add-preset=<preset-name>" # Create preset, like default, which will be selected on button click.
- "<preset-name>=true" # Specify which presets to use for specific container.
- "protocol=https" # For this container set weblink protocol.
- "path=index.html" # For this contaienr set weblink path.
- '[{"container": "custom","networks": ["frontend"], "labels": ["default=true","controllable=false"], "ports": ["9090:9090"]}]' # Add custom container
The main features include:
build
and down
command to clear up any issues with old running containers.These are some general tips for users of this software:
.dockerignore
files in your repository in order to speed up build times and keep containers small.dcdc_internet_network
network../example/docker-compose.yml
for examples.To ensure that the project maintains a high quality code, several CI/CD github actions has been added to the project. These must pass in order to get pull requests merged into main branch.
The workflows include:
To run tests run:
./__tests__/run_locally.sh
Note: This will create several cache folders with test results in your folders.
The project is built on a multitude of libraries, the main once are listed below:
This repository is created using MIT LICENSE
Let me know if there are any questions or issues.
@ Grebtsew 2024