pub struct Project {
pub name: String,
pub file: ComposeFile,
pub base_dir: PathBuf,
pub files: Vec<PathBuf>,
pub vars: BTreeMap<String, String>,
pub dotenv: BTreeMap<String, String>,
pub store_secrets: SecretValues,
}Expand description
A loaded, interpolated, merged compose project.
Fields§
§name: StringProject name (default sandbox names are <name>-<service>).
file: ComposeFileThe merged file, with every service’s container_name and every
volume’s name filled in.
base_dir: PathBufDirectory of the first file: relative bind paths resolve against it.
files: Vec<PathBuf>§vars: BTreeMap<String, String>Explicit variables and the env files’ values, kept so that secrets
with environment: resolve the way ${VAR} did.
dotenv: BTreeMap<String, String>§store_secrets: SecretValuesValues of the secrets that come from the org’s store (external,
age, driver), read by the caller before up
(Project::store_backed_secrets says which).
Implementations§
Source§impl Project
impl Project
Sourcepub fn service(&self, service: &str) -> Result<&SandboxSpec>
pub fn service(&self, service: &str) -> Result<&SandboxSpec>
A sandbox by service name.
Sourcepub fn select(&self, services: &[String]) -> Result<Vec<String>>
pub fn select(&self, services: &[String]) -> Result<Vec<String>>
Service names in dependency order, or the given subset (validated)
plus what it depends on, as docker compose up web also starts web’s
dependencies.
Sourcepub fn select_exact(&self, services: &[String]) -> Result<Vec<String>>
pub fn select_exact(&self, services: &[String]) -> Result<Vec<String>>
Exactly the given services (all when empty), validated, in dependency
order. For commands that should not pull in dependencies (down, ps).
pub fn files_display(&self) -> String
Sourcepub fn lookup(&self, k: &str) -> Option<String>
pub fn lookup(&self, k: &str) -> Option<String>
A variable as interpolation sees it: explicit vars, then the environment, then the env files.
Sourcepub fn secret_values(&self) -> Result<BTreeMap<String, Vec<u8>>>
pub fn secret_values(&self) -> Result<BTreeMap<String, Vec<u8>>>
The values of the secrets the services use: file: and
environment: ones read here, the rest from
Project::store_secrets.
Sourcepub fn store_backed_secrets(&self) -> BTreeMap<String, SecretDef>
pub fn store_backed_secrets(&self) -> BTreeMap<String, SecretDef>
The secrets the services use whose values come from the org’s store
and the daemon’s key (external, age, driver).