Skip to content

Commit

Permalink
feat(deployer): implement container memory limits (#411)
Browse files Browse the repository at this point in the history
* feat(deployer): implement container memory limits

* test: fix warp integration test
  • Loading branch information
oddgrd authored Oct 20, 2022
1 parent 76f4fee commit 607c3e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/warp/hello-world/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ use warp::Reply;

#[shuttle_service::main]
async fn warp() -> shuttle_service::ShuttleWarp<(impl Reply,)> {
let route = warp::any().map(|| "Hello, World");
let route = warp::any().map(|| "Hello, World!");
Ok(route.boxed())
}
4 changes: 3 additions & 1 deletion gateway/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@ impl ProjectCreating {
"Target": "/opt/shuttle",
"Source": format!("{prefix}{project_name}_vol"),
"Type": "volume"
}]
}],
"Memory": 6442450000i64, // 6 GiB hard limit
"MemoryReservation": 4295000000i64, // 4 GiB soft limit, applied if host is low on memory
});

debug!(
Expand Down

0 comments on commit 607c3e1

Please sign in to comment.