feat: with sled db and capnp

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-08-27 18:15:25 +02:00
parent 757d1081bd
commit 75d99c2461
13 changed files with 207 additions and 41 deletions

View File

@@ -17,6 +17,9 @@ async fn main() -> eyre::Result<()> {
let cli = build_container(client.clone(), "churn").await?;
let server = build_container(client.clone(), "churn-server").await?;
let server = server
.with_env_variable("CHURN_DATABASE", "sled")
.with_env_variable("CHURN_SLED_PATH", "/mnt/sled")
.with_mounted_cache("/mnt/sled", client.cache_volume("sled").id().await?)
.with_exec(vec!["churn-server", "serve", "--host", "0.0.0.0:3000"])
.with_exposed_port(3000);
@@ -113,7 +116,14 @@ async fn build_container(
bin_name: &str,
) -> eyre::Result<dagger_sdk::Container> {
let crates = &["crates/*", "ci"];
let debian_deps = &["libssl-dev", "pkg-config", "openssl", "git", "jq"];
let debian_deps = &[
"libssl-dev",
"pkg-config",
"openssl",
"git",
"jq",
"capnproto",
];
let debian_image = "debian:bullseye".to_string();
let images = dagger_rust::build::RustBuild::new(client.clone())