Struct compose_spec::Compose
source · pub struct Compose {
pub version: Option<String>,
pub name: Option<Name>,
pub include: Vec<ShortOrLong<PathBuf, Include>>,
pub services: IndexMap<Identifier, Service>,
pub networks: Networks,
pub volumes: Volumes,
pub configs: Configs,
pub secrets: Secrets,
pub extensions: Extensions,
}Expand description
The Compose file is a YAML file defining a containers based application.
Note that the Deserialize implementations of many types within Compose make use of
Deserializer::deserialize_any(). This means that
you should only attempt to deserialize from self-describing formats like YAML or JSON.
Fields§
§version: Option<String>Declared for backward compatibility, ignored.
name: Option<Name>Define the Compose project name, until user defines one explicitly.
include: Vec<ShortOrLong<PathBuf, Include>>Compose sub-projects to be included.
services: IndexMap<Identifier, Service>The Services (containerized computing components) of the application.
networks: NetworksNamed networks for Services to communicate with each other.
volumes: VolumesNamed volumes which can be reused across multiple Services.
Volumes are persistent data stores implemented by the container engine.
configs: ConfigsConfigs allow Services to adapt their behavior without needing to rebuild the container
image.
secrets: SecretsSensitive data that a Service may be granted access to.
extensions: ExtensionsExtension values, which are (de)serialized via flattening.