Skip to main content

Module compose

Module compose 

Source
Expand description

Compose stacks in project environments.

Every compose stack (stack_deploy) belongs to exactly one project environment, recorded on the project (super::ComposeRef). Ownership is metadata only: attaching or detaching a stack never renames, redeploys or rolls it. What it adds is a name: a service redis of stack wiki in wiki/production is also redis.wiki-production, as the environment’s apps are named (see crate::discovery).

A name in an environment has one holder. A new deploy that would take a name the environment already gives an app or another stack’s service is refused; where two held one before ownership existed, an app wins, then the stack that joined first (then the stack name), and the loser keeps its own <service>.<stack> but gets no environment name.

Stacks with no owner (deployed before ownership existed) are adopted when the daemon starts: into the project of the same name when there is one, else a new project named after the stack.

Structs§

ComposeOwner
Which project environment a compose stack belongs to.
Conflict
A name in an environment that a compose service did not get.
EnvCompose
An environment’s compose stacks and the names they contest.