a poor man's gitops
Find a file
2023-12-20 14:10:01 +01:00
.gitignore feat: replace shell script with python implementation 2023-12-20 14:09:58 +01:00
config.yml.example feat: add configurable log level 2023-12-20 14:10:01 +01:00
dc-ops fix: exec docker compose in stackdir 2023-12-20 14:10:01 +01:00
README.md feat: replace shell script with python implementation 2023-12-20 14:09:58 +01:00
requirements.txt feat: replace shell script with python implementation 2023-12-20 14:09:58 +01:00

Docker Compose GitOps (dc-ops)

dc-ops is a simple python script that automates the update and deployment of multiple Docker Compose applications.

How does it work?

It reads a list of git repositories from a YAML configuration file (config.yml), pulls the latest changes for each repo, and runs docker compose up for each specified docker-compose.yml file.

Features

  • Automatically checks for updates in git repositories
  • Supports multiple Docker Compose files per repository
  • Can be configured to skip certain repositories

Requirements

See requirements.txt

Usage

  1. Install the required Python packages: pip install -r requirements.txt
  2. Adapt config.yml.example to your needs and save it as config.yml
  3. Run dc-ops from the shell or from a cron job

Detailed process

For each enabled stack in the config file, the following process will be executed:

  1. Checking directory existence
  2. Fetching latest changes from remote repository
  3. If there is a new commit, it will pull the changes
  4. Running Docker Compose with the defined or default compose-file(s)