mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 17:14:08 +02:00
set blackfire env
This commit is contained in:
parent
f291c8602a
commit
5e020204e3
2 changed files with 20 additions and 1 deletions
11
src/cloud.rs
11
src/cloud.rs
|
|
@ -251,7 +251,7 @@ impl Cloud {
|
|||
format!("GID={}", gid),
|
||||
format!("SQL={}", options.db.name()),
|
||||
];
|
||||
let volumes = mappings
|
||||
let mut volumes: Vec<String> = mappings
|
||||
.into_iter()
|
||||
.filter_map(|mapping| mapping.get_volume_arg(&id, config))
|
||||
.collect();
|
||||
|
|
@ -266,6 +266,15 @@ impl Cloud {
|
|||
env.push(format!("SQL={}", options.db.name()));
|
||||
}
|
||||
|
||||
if let Some(blackfire) = config.blackfire.as_ref() {
|
||||
env.push(format!("BLACKFIRE_SERVER_ID={}", blackfire.server_id));
|
||||
env.push(format!("BLACKFIRE_SERVER_TOKEN={}", blackfire.server_token));
|
||||
env.push(format!("BLACKFIRE_CLIENT_ID={}", blackfire.client_id));
|
||||
env.push(format!("BLACKFIRE_CLIENT_TOKEN={}", blackfire.client_token));
|
||||
env.push(format!("BLACKFIRE_SOCKET=/var/run/blackfire/agent.sock"));
|
||||
volumes.push("/var/run/blackfire/agent.sock:/var/run/blackfire/agent.sock".into());
|
||||
}
|
||||
|
||||
let service_containers = try_join_all(
|
||||
options
|
||||
.services
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ pub struct HazeConfig {
|
|||
pub auto_setup: HazeAutoSetupConfig,
|
||||
#[serde(default)]
|
||||
pub volume: Vec<HazeVolumeConfig>,
|
||||
#[serde(default)]
|
||||
pub blackfire: Option<HazeBlackfireConfig>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
|
|
@ -59,6 +61,14 @@ pub struct HazeVolumeConfig {
|
|||
pub create: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct HazeBlackfireConfig {
|
||||
pub server_id: String,
|
||||
pub server_token: String,
|
||||
pub client_id: String,
|
||||
pub client_token: String,
|
||||
}
|
||||
|
||||
impl HazeConfig {
|
||||
pub fn load() -> Result<Self> {
|
||||
let dirs = ProjectDirs::from("nl", "icewind", "haze").unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue