quad-ops

module
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: MIT

README

Quad-Ops

Build Docs GitHub License GitHub Release codecov

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
  • Init containers - Run initialization containers before main services start (similar to Kubernetes)
  • 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)

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/quad-ops
sudo cp configs/config.yaml.example /etc/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
internal
compose
Package compose provides Docker Compose project processing functionality
Package compose provides Docker Compose project processing functionality
config
Package config provides configuration management for quad-ops
Package config provides configuration management for quad-ops
dependency
Package dependency provides service dependency graph management for Docker Compose projects.
Package dependency provides service dependency graph management for Docker Compose projects.
fs
Package fs provides file system operations for quadlet unit management
Package fs provides file system operations for quadlet unit management
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.
repository
Package repository provides data access layer for quad-ops units.
Package repository provides data access layer for quad-ops units.
systemd
Package systemd provides systemd unit management operations.
Package systemd provides systemd unit management operations.
unit
Package unit provides quadlet unit types and generation functionality
Package unit provides quadlet unit types and generation functionality
util
Package util provides utility functions for operations like sorting and iterating over slices and maps
Package util provides utility functions for operations like sorting and iterating over slices and maps
validate
Package validate provides security validation functions for sensitive data
Package validate provides security validation functions for sensitive data

Jump to

Keyboard shortcuts

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