This tool is designed to facilitate the implementation of GitOps principles using Docker Compose
131
Compose GitOps is a tool designed to automate the deployment and synchronization of Docker Compose-based applications from multiple Git repositories. It leverages Docker Compose for managing multi-container Docker applications and Git for version control. This tool is especially useful for orchestrating deployments in a GitOps workflow.
Before using Compose GitOps, ensure that you have the following prerequisites installed:
See Compose GitOps in action:

To quickly set up Compose GitOps, follow these steps:
Download Docker Compose Configuration:
Fetch the Docker Compose configuration directly from the GitHub repository using curl:
curl -o docker-compose.yaml https://raw.githubusercontent.com/r3d-shadow/compose-gitops/main/docker-compose.yaml
This command retrieves the latest docker-compose.yml file from the repository.
Adjust Configuration Files:
Modify the docker-compose.yml file:
repositories.yaml file is mounted appropriately.volumes:
- ~/.docker/config.json:/root/.docker/config.json:ro
Edit the repositories.yaml file:
Include details of the Git repositories you wish to manage.
repositories.yaml:repositories:
- name: "HelloWorld App"
source:
repoURL: "github.com/r3d-shadow/helloworld.git" # without scheme
branch: "main"
composePath: "utils/deploy/docker-compose.yaml"
authentication:
method: "oauth2"
token: "GITHUB_TOKEN"
hooks:
preDeploy: |
echo "Running pre-deploy actions for HelloWorld App"
postDeploy: |
echo "Running post-deploy actions for HelloWorld App"
Run Docker Compose:
Start Compose GitOps using Docker Compose:
docker-compose up -d
This command launches the Compose GitOps service in the background, configured based on your adjusted docker-compose.yml and repositories.yaml files.
Description: Implement automatic Docker login functionality to simplify the management of private Docker repositories.
Steps:
Expected Outcome: Users will be able to manage private Docker repositories effortlessly without manual login steps.
repositories.yaml File Change Detection and Auto-UpdateDescription: Enhance the tool to detect changes in the repositories.yaml file and automatically update the configurations without manual intervention.
Steps:
repositories.yaml file.Expected Outcome: Simplify the management of Git repositories by automatically reflecting changes made to the repositories.yaml file.
Feel free to contribute to the development of Compose GitOps. Fork the repository, make your changes, and submit a pull request.
Content type
Image
Digest
sha256:01e26237f…
Size
143.5 MB
Last updated
over 2 years ago
docker pull r3dshadow/compose-gitops:cg-bd5cd14