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 —.
moira ls --drift # only rows with cfg or imgmoira status shop-prod # Drift line for one serviceHow it is computed
Section titled “How it is computed”cfgcompares the hash Compose would use today (docker compose config --hash) with thecom.docker.compose.config-hashlabel on the container. This is the same check Compose makes when deciding whetherup -drecreates a container, and it covers changes to env file values.imgcompares 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.
After upgrading Compose on a host
Section titled “After upgrading Compose on a host”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.