diff --git a/Cargo.lock b/Cargo.lock index df7ec4bf65..2366953f36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3974,7 +3974,7 @@ dependencies = [ [[package]] name = "rofl-containers" -version = "0.3.2" +version = "0.3.3" dependencies = [ "anyhow", "base64", diff --git a/rofl-appd/src/lib.rs b/rofl-appd/src/lib.rs index a15137299c..2bccec0da7 100644 --- a/rofl-appd/src/lib.rs +++ b/rofl-appd/src/lib.rs @@ -29,7 +29,10 @@ where let env: Arc = Arc::new(state::EnvImpl::new(env)); // Server configuration. - let rocket_cfg = Figment::new().join(("address", cfg.address)); + let rocket_cfg = Figment::from(rocket::config::Config::default()) + .select("default") + .merge(("address", cfg.address)) + .merge(("reuse", true)); rocket::custom(rocket_cfg) .manage(env) diff --git a/rofl-containers/Cargo.toml b/rofl-containers/Cargo.toml index a894556665..d6d34f489d 100644 --- a/rofl-containers/Cargo.toml +++ b/rofl-containers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rofl-containers" -version = "0.3.2" +version = "0.3.3" edition = "2021" [dependencies] diff --git a/rofl-containers/src/main.rs b/rofl-containers/src/main.rs index 25923c2a71..eaccc9b078 100644 --- a/rofl-containers/src/main.rs +++ b/rofl-containers/src/main.rs @@ -77,7 +77,14 @@ impl App for ContainersApp { address: ROFL_APPD_ADDRESS, kms: kms.clone(), }; - let _ = rofl_appd::start(cfg, env.clone()).await; + let appd_logger = logger.clone(); + let appd_env = env.clone(); + tokio::spawn(async move { + if let Err(err) = rofl_appd::start(cfg, appd_env).await { + slog::error!(appd_logger, "failed to start API server"; "err" => ?err); + process::abort(); + } + }); // Initialize containers. slog::info!(logger, "initializing container environment");