diff --git a/ci/flame-conf.yaml b/ci/flame-conf.yaml index 9b4f79b..86209a1 100644 --- a/ci/flame-conf.yaml +++ b/ci/flame-conf.yaml @@ -8,12 +8,8 @@ applications: - name: "pi" shim: Stdio command: "target/debug/pi-server" - working_directory: "/tmp" - name: "flmexec" shim: Log - command: "" - working_directory: "/tmp" - name: "matrix" shim: Wasm command: "examples/matrix/server/target/wasm32-wasi/debug/matrix_server.wasm" - working_directory: "/tmp" diff --git a/common/src/apis.rs b/common/src/apis.rs index e56a49c..8d2c712 100644 --- a/common/src/apis.rs +++ b/common/src/apis.rs @@ -117,11 +117,13 @@ pub enum Shim { pub struct Application { pub name: String, pub shim: Shim, + #[serde(default)] pub command: String, #[serde(default)] pub arguments: Vec, #[serde(default)] pub environments: Vec, + #[serde(default = "default_work_dir")] pub working_directory: String, } @@ -436,3 +438,7 @@ impl fmt::Display for TaskGID { write!(f, "{}/{}", self.ssn_id, self.task_id) } } + +fn default_work_dir() -> String { + String::from("/tmp") +} diff --git a/installer/flame-conf.yaml b/installer/flame-conf.yaml index 195a566..dd84f18 100644 --- a/installer/flame-conf.yaml +++ b/installer/flame-conf.yaml @@ -7,13 +7,9 @@ storage: mem applications: - name: "flmexec" shim: Log - command: "" - working_directory: "/tmp" - name: "pi" shim: Stdio command: "/opt/pi-server" - working_directory: "/tmp" - name: "matrix" shim: Wasm command: "/opt/matrix_server.wasm" - working_directory: "/tmp"