quad-ops

module
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2025 License: MIT

README

Quad-Ops

Build Docs GitHub License GitHub Release

GitOps for Quadlet

Quad-Ops is a lightweight GitOps framework for Podman containers managed by Quadlet. It watches Git repositories for standard Docker Compose files and automatically converts them into systemd unit files to run your containers.

For comprehensive documentation, visit https://trly.github.io/quad-ops/

Key Features

  • Monitor multiple Git repositories for container configurations
  • Support for standard Docker Compose files (services, networks, volumes, secrets)
  • Support for Podman-specific features like exposing secrets as environment variables
  • Automatic detection of service-specific environment files
  • Automated dependencies via systemd unit relationships
  • Intelligent restarts - only restarts services that changed and their dependents
  • Works in both system-wide and user (rootless) modes

Configuration Example

repositories:
  - name: quad-ops-compose  # Repository name (required)
    url: "https://github.com/example/repo.git"  # Git repository URL (required)
    ref: "main"  # Git reference to checkout: branch, tag, or commit hash (optional)
    composeDir: "compose"  # Subdirectory where Docker Compose files are located (optional)
    cleanup: "delete"  # Cleanup policy: "delete" or "keep" (default: "keep")

Getting Started with Development

# Clone the repository
git clone https://github.com/trly/quad-ops.git
cd quad-ops

# Build the binary
go build -o quad-ops cmd/quad-ops/main.go

# Run tests
go test -v ./...

# Run linting
mise exec -- golangci-lint run

Installation

# Build the binary
go build -o quad-ops cmd/quad-ops/main.go

# Move to system directory
sudo mv quad-ops /usr/local/bin/

# Copy the example config file
sudo mkdir -p /etc/opt/quad-ops
sudo cp configs/config.yaml.example /etc/opt/quad-ops/config.yaml

# Install the systemd service file (optional)
sudo cp build/quad-ops.service /etc/systemd/system/quad-ops.service

# Reload systemd daemon
sudo systemctl daemon-reload

# Enable and start the service
sudo systemctl enable --now quad-ops

Directories

Path Synopsis
cmd
Package cmd provides the command line interface for quad-ops
Package cmd provides the command line interface for quad-ops
quad-ops command
unit
Package unit provides unit command functionality for quad-ops CLI
Package unit provides unit command functionality for quad-ops CLI
internal
compose
Package compose provides Docker Compose file parsing and handling
Package compose provides Docker Compose file parsing and handling
config
Package config provides configuration management for quad-ops
Package config provides configuration management for quad-ops
db
Package db provides database functionality for quad-ops.
Package db provides database functionality for quad-ops.
git
Package git provides git repository management functionality for quad-ops
Package git provides git repository management functionality for quad-ops
log
Package log provides logging functionality for quad-ops.
Package log provides logging functionality for quad-ops.
unit
Package unit provides quadlet unit generation and management functionality
Package unit provides quadlet unit generation and management functionality
util
Package util provides utility functions for operations like sorting.
Package util provides utility functions for operations like sorting.
validate
Package validate provides functions to validate various aspects of the application.
Package validate provides functions to validate various aspects of the application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL