Skip to content

Drift

moira ls has a DRIFT column. Each managed container reports two flags:

Flag Meaning Clear it with
cfg The service’s compose definition or env files changed since the container was created moira apply
img The local image for the container’s tag is newer than the one it runs moira apply (or update to pull again first)

clean means neither flag is set. Unmanaged containers, one-off containers and missing services show —.

Terminal window
moira ls --drift # only rows with cfg or img
moira status shop-prod # Drift line for one service
  • cfg compares the hash Compose would use today (docker compose config --hash) with the com.docker.compose.config-hash label on the container. This is the same check Compose makes when deciding whether up -d recreates a container, and it covers changes to env file values.
  • img compares the image ID that the container’s image reference points to locally with the image ID the container runs. A tag pulled outside moira shows up here immediately.

There is no registry check: img doesn’t know about images that haven’t been pulled yet. update pulls and recreates in one step.

moirad caches each stack’s Compose model and hashes, and refreshes them when a compose file, override, .env or referenced env file changes on disk. It computes drift only when asked, so an idle daemon does no work.

moirad ships its own Compose version. Hashes written by an older Compose on the host can differ, so services that haven’t changed may show cfg until they have been applied once through moira.