Skip to content

Commit

Permalink
more mixer env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Evanfeenstra committed Jul 12, 2024
1 parent 1dc8dba commit 4deb2f6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/images/mixer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ pub struct MixerImage {
pub log_level: Option<String>,
pub initial_peers: Option<String>, // alt brokers
pub default_tribe_pubkey: Option<String>,
pub default_router: Option<String>,
pub hub_url: Option<String>,
pub invite_price: Option<String>,
pub timeout_ms: Option<String>,
}
Expand All @@ -42,6 +44,8 @@ impl MixerImage {
log_level: None,
initial_peers: None,
default_tribe_pubkey: None,
default_router: None,
hub_url: None,
invite_price: None,
timeout_ms: None,
}
Expand Down Expand Up @@ -72,6 +76,12 @@ impl MixerImage {
pub fn set_default_tribe_pubkey(&mut self, pk: &str) {
self.default_tribe_pubkey = Some(pk.to_string())
}
pub fn set_default_router(&mut self, dr: &str) {
self.default_router = Some(dr.to_string())
}
pub fn set_hub_url(&mut self, hu: &str) {
self.hub_url = Some(hu.to_string())
}
}

#[async_trait]
Expand Down Expand Up @@ -164,6 +174,12 @@ fn mixer(img: &MixerImage, broker: &BrokerImage, cln: &Option<ClnImage>) -> Resu
if let Some(dts) = &img.default_tribe_pubkey {
env.push(format!("DEFAULT_TRIBE_PUBKEY={}", dts));
}
if let Some(dr) = &img.default_router {
env.push(format!("DEFAULT_ROUTER={}", dr));
}
if let Some(hu) = &img.hub_url {
env.push(format!("HUB_URL={}", hu));
}

let mut c = Config {
image: Some(format!("{}:{}", image, img.version)),
Expand Down

0 comments on commit 4deb2f6

Please sign in to comment.