Quad-Ops Configuration

Quad-Ops Configuration #

Quad-Ops uses a YAML configuration file to define global settings and repository management options.

Configuration File Location #

By default, Quad-Ops looks for configuration files in the following locations:

  • /etc/quad-ops/config.yaml (system-wide)
  • ~/.config/quad-ops/config.yaml (user mode)
  • ./config.yaml (current directory)

You can specify a custom configuration file using the --config flag:

quad-ops --config /path/to/config.yaml sync

Global Settings #

Core Options #

OptionTypeDefaultDescription
repositoryDirstring/var/lib/quad-opsDirectory where Git repositories are cloned
syncIntervalduration5mInterval between automatic repository synchronization
quadletDirstring/etc/containers/systemdDirectory for Podman Quadlet unit files
dbPathstring/var/lib/quad-ops/quad-ops.dbPath to the SQLite database file
userModebooleanfalseEnable user-mode (rootless) operation
verbosebooleanfalseEnable verbose logging output

Container Naming #

OptionTypeDefaultDescription
usePodmanDefaultNamesbooleanfalseUse Podman’s default naming with systemd- prefix

When usePodmanDefaultNames is false (default):

  • Container hostnames: project-service (e.g., myapp-db)
  • Direct service-to-service communication works seamlessly

When usePodmanDefaultNames is true:

  • Container hostnames: systemd-project-service (e.g., systemd-myapp-db)
  • Follows Podman’s default systemd naming convention

User Mode Configuration #

For rootless operation, user mode changes several default paths:

SettingSystem ModeUser Mode
repositoryDir/var/lib/quad-ops~/.local/share/quad-ops
quadletDir/etc/containers/systemd~/.config/containers/systemd
dbPath/var/lib/quad-ops/quad-ops.db~/.local/share/quad-ops/quad-ops.db

Example Configuration #

Minimal Configuration #

repositories:
  - name: myapp
    url: https://github.com/user/myapp.git

Complete Configuration #

# Global settings
repositoryDir: /var/lib/quad-ops
syncInterval: 10m
quadletDir: /etc/containers/systemd
dbPath: /var/lib/quad-ops/quad-ops.db
userMode: false
verbose: true
usePodmanDefaultNames: false

# Repository definitions
repositories:
  - name: webapp
    url: https://github.com/company/webapp.git
    ref: main
    composeDir: deploy
    cleanup: keep

  - name: microservices
    url: https://github.com/company/microservices.git
    ref: production
    composeDir: compose
    cleanup: delete
    usePodmanDefaultNames: true

Environment-Specific Configuration #

# Development environment
syncInterval: 1m
verbose: true

repositories:
  - name: dev-app
    url: https://github.com/company/app.git
    ref: develop
    cleanup: delete  # Clean up when switching branches
# Production environment
syncInterval: 30m
verbose: false

repositories:
  - name: prod-app
    url: https://github.com/company/app.git
    ref: v2.1.0  # Pin to specific version
    cleanup: keep  # Preserve deployments

Configuration Validation #

Quad-Ops validates the configuration file on startup and will report errors for:

  • Invalid YAML syntax
  • Missing required fields
  • Invalid duration formats
  • Duplicate repository names
  • Invalid cleanup policy values

Next Steps #