github basnijholt/compose-farm v1.23.0

latest releases: v1.24.1, v1.24.0
3 hours ago

Features

  • Plugin system. Plugins are listed under a new plugins: key in compose-farm.yaml (plugin name → options) and run in the listed order. They are discovered through the compose_farm.plugins entry-point group. They hook into the stack lifecycle through before_up, preflight, after_source_stopped, after_up, and after_stack_removed. With compose_args they can also add global docker compose arguments, such as --env-file, to every compose command. See the new Plugins page.
  • Builtin commands plugin: runs shell commands from the config at each hook, either on the target host (run:) or on the machine running cf (local:). It can also add preflight checks and extra compose arguments. No Python needed.
  • Builtin sync plugin: rsyncs each stack directory to its host before every start, over compose-farm's SSH settings. This replaces NFS for compose files.
  • Example plugins in examples/plugins/:
    • agenix passes secrets decrypted on each host to compose as --env-file and checks them during preflight.
    • zfs gives each stack its own ZFS dataset. The dataset moves with the stack on migration, or all datasets live on one NAS with storage_host.
    • Install one next to compose-farm:
      uv tool install compose-farm \
        --with "compose-farm-zfs @ git+https://github.com/basnijholt/compose-farm#subdirectory=examples/plugins/zfs"
  • cf check and cf config validate list the enabled plugins. Problems found by plugin preflight checks are reported by cf up, cf check, and the host-compatibility check.
  • The Docker image now includes rsync.

Bug fixes

  • cf apply no longer stops a stack on its old host as a stray before migrating it. That also disabled rollback. The migration now stops the old host itself, including when discovery reports that host under an alias.
  • When cleaning up a failed start on the new host fails, a migration no longer restarts the stack on the old host, so a stack can't end up running on both hosts.
  • Stopping orphaned stacks now clears each host from the state as soon as it stops, instead of only when every host succeeded.

Testing

  • Added end-to-end tests on disposable Incus VMs (e2e/). Real multi-host runs cover sync and commands, ZFS migrations with no lost writes, NFS storage mode, and agenix secrets.

Full changelog: v1.22.1...v1.23.0

Don't miss a new compose-farm release

NewReleases is sending notifications on new releases.