pub struct ComposeFile {
pub name: Option<String>,
pub incus_project: Option<String>,
pub volumes: BTreeMap<String, NamedVolumeSpec>,
pub services: BTreeMap<String, SandboxSpec>,
pub secrets: BTreeMap<String, SecretDef>,
}Expand description
A compose file: named volumes plus any number of services, each one sandbox. Mirrors docker compose wherever incus allows.
Fields§
§name: Option<String>Project name. Default sandbox names are <name>-<service> and named
volumes are <name>_<volume>. Defaults to the directory holding the
first compose file.
incus_project: Option<String>incus project to operate in (default: default).
volumes: BTreeMap<String, NamedVolumeSpec>Named custom storage volumes, created if missing before any sandbox that uses them. Keys are what services refer to.
services: BTreeMap<String, SandboxSpec>Sandboxes, keyed by service name.
secrets: BTreeMap<String, SecretDef>Secrets services can mount as files under /run/secrets. Values are
read when the file is deployed and never stored in instance config.
Trait Implementations§
Source§impl Clone for ComposeFile
impl Clone for ComposeFile
Source§impl Debug for ComposeFile
impl Debug for ComposeFile
Source§impl Default for ComposeFile
impl Default for ComposeFile
Source§impl<'de> Deserialize<'de> for ComposeFile
impl<'de> Deserialize<'de> for ComposeFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ComposeFile
impl JsonSchema for ComposeFile
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ComposeFile
impl PartialEq for ComposeFile
Source§impl Serialize for ComposeFile
impl Serialize for ComposeFile
impl StructuralPartialEq for ComposeFile
Auto Trait Implementations§
impl Freeze for ComposeFile
impl RefUnwindSafe for ComposeFile
impl Send for ComposeFile
impl Sync for ComposeFile
impl Unpin for ComposeFile
impl UnsafeUnpin for ComposeFile
impl UnwindSafe for ComposeFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more