1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-04 01:24:09 +02:00

allow using release sources

This commit is contained in:
Robin Appelman 2026-02-27 22:01:44 +01:00
commit f569ca17e2
9 changed files with 1226 additions and 113 deletions

View file

@ -164,6 +164,7 @@ impl PhpVersion {
host: &str,
services: &[Service],
proxy_config: &ProxyConfig,
version: Option<&str>,
) -> Result<String> {
ensure_network_exists(docker, "haze").await?;
pull_image(docker, self.image()).await?;
@ -192,6 +193,17 @@ impl PhpVersion {
proxy_config.addr(id, IpAddr::V4(Ipv4Addr::LOCALHOST))
));
let mut labels = hashmap! {
"haze-type".to_string() => "cloud".to_string(),
"haze-db".to_string() => db.name().to_string(),
"haze-php".to_string() => self.name().to_string(),
"haze-cloud-id".to_string() => id.to_string(),
"haze-services".to_string() => services.iter().map(|s| s.name()).join(","),
};
if let Some(version) = version {
labels.insert("haze-version".to_string(), version.to_string());
}
let config = Config {
image: Some(self.image().to_string()),
env: Some(env),
@ -211,13 +223,7 @@ impl PhpVersion {
}
},
}),
labels: Some(hashmap! {
"haze-type".to_string() => "cloud".to_string(),
"haze-db".to_string() => db.name().to_string(),
"haze-php".to_string() => self.name().to_string(),
"haze-cloud-id".to_string() => id.to_string(),
"haze-services".to_string() => services.iter().map(|s| s.name()).join(","),
}),
labels: Some(labels),
..Default::default()
};