Expand description
A compose stack’s source and what the daemon adds to it at deploy: the
stack’s environment (variables ${VAR} resolves against, kept apart
from the file) and its managed domains (domain records kept apart from
the file, per service). The file is stored as written; these are merged
into the copy that runs.
A variable whose value is a secret reaches a service only as the whole
value of one of its environment variables (KEY: ${VAR}), which is
delivered as a store secret (KEY: {secret: ...}), so the value never
enters the stored file. Used anywhere else it is refused.
Functions§
- deliver_
secret_ vars - Deliver the variables in
secret_vars(variable to store secret name) as secrets: a service environment variable whose whole value is one of them becomes{secret: env.<name>}, with that top-level secret declared (external, from the store).baregives a bare list entry’s value when its variable is no secret. A secret variable used anywhere else is an error naming it. Returns whethervchanged. - env_
secret_ key - The top-level secret key an environment variable’s secret
namerenders to. - file_
domains - The domains the file itself gives each service: what is deployed less what was merged in from the managed records.
- merge_
domains - Add the stack’s managed domains to the services they are for. A hostname the file already gives any service, or that the managed records claim twice (same host and path), is an error naming it. Records for a service the file does not have are kept but unused.
- referenced_
vars - Every variable a compose document refers to:
${VAR}anywhere, and a bareVARin an environment list (which takes the variable’s value).