Skip to content

Commit

Permalink
vec added
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachit2323 committed Jan 19, 2025
1 parent 1fe1cc9 commit 81ca39b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/cli/src/docker_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub async fn handle_docker_init(config_path: String, output_dir: String) -> Resu

let mut warnings = Vec::new();

let mut needs_signer_module = cb_config.pbs.with_signer;
let mut needs_signer_module = cb_config.pbs_modules[0].with_signer;

// setup modules
if let Some(modules_config) = cb_config.modules {
Expand Down Expand Up @@ -267,13 +267,13 @@ pub async fn handle_docker_init(config_path: String, output_dir: String) -> Resu

// ports
let host_endpoint =
SocketAddr::from((cb_config.pbs.pbs_config.host, cb_config.pbs.pbs_config.port));
let ports = Ports::Short(vec![format!("{}:{}", host_endpoint, cb_config.pbs.pbs_config.port)]);
warnings.push(format!("pbs has an exported port on {}", cb_config.pbs.pbs_config.port));
SocketAddr::from((cb_config.pbs_modules[0].pbs_config.host, cb_config.pbs_modules[0].pbs_config.port));
let ports = Ports::Short(vec![format!("{}:{}", host_endpoint, cb_config.pbs_modules[0].pbs_config.port)]);
warnings.push(format!("pbs has an exported port on {}", cb_config.pbs_modules[0].pbs_config.port));

// inside the container expose on 0.0.0.0
let container_endpoint =
SocketAddr::from((Ipv4Addr::UNSPECIFIED, cb_config.pbs.pbs_config.port));
SocketAddr::from((Ipv4Addr::UNSPECIFIED, cb_config.pbs_modules[0].pbs_config.port));
let (key, val) = get_env_val(PBS_ENDPOINT_ENV, &container_endpoint.to_string());
pbs_envs.insert(key, val);

Expand All @@ -290,15 +290,15 @@ pub async fn handle_docker_init(config_path: String, output_dir: String) -> Resu

let pbs_service = Service {
container_name: Some("cb_pbs".to_owned()),
image: Some(cb_config.pbs.docker_image),
image: Some(cb_config.pbs_modules[0].docker_image.clone()),
ports,
networks: pbs_networs,
volumes: pbs_volumes,
environment: Environment::KvPair(pbs_envs),
healthcheck: Some(Healthcheck {
test: Some(HealthcheckTest::Single(format!(
"curl -f http://localhost:{}{}{}",
cb_config.pbs.pbs_config.port, BUILDER_API_PATH, GET_STATUS_PATH
cb_config.pbs_modules[0].pbs_config.port, BUILDER_API_PATH, GET_STATUS_PATH
))),
interval: Some("30s".into()),
timeout: Some("5s".into()),
Expand Down

0 comments on commit 81ca39b

Please sign in to comment.