diff --git a/Cargo.toml b/Cargo.toml index 8b1faa3e9..7d5d7cb8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -89,5 +89,5 @@ aws-sdk-ec2 = "1.40.0" # MISC derive_builder = "0.20.0" -colored = "2.1.0" typeshare = "1.0.3" +colored = "2.1.0" diff --git a/bin/cli/resources/deployments.toml b/bin/cli/resources/deployments.toml index 7663af1f4..b4f4b5db2 100644 --- a/bin/cli/resources/deployments.toml +++ b/bin/cli/resources/deployments.toml @@ -173,7 +173,7 @@ local = "/home/ubuntu/.config/monitor/dev.core.config.toml" container = "/config/config.toml" [[deployment.config.volumes]] -local = "/etc/monitor/repos/monitor-dev-frontend/frontend/dist" +local = "/data/repos/monitor-dev-frontend/frontend/dist" container = "/frontend" [[deployment.config.labels]] diff --git a/bin/cli/src/main.rs b/bin/cli/src/main.rs index d805491a6..1a7e6de7b 100644 --- a/bin/cli/src/main.rs +++ b/bin/cli/src/main.rs @@ -25,20 +25,26 @@ struct CliArgs { #[command(subcommand)] command: Command, /// The path to a creds file. - #[arg(long, default_value_t = String::from("./creds.toml"))] + #[arg(long, default_value_t = default_creds())] creds: String, /// Log less (just resource names). #[arg(long, default_value_t = false)] quiet: bool, } +fn default_creds() -> String { + let home = std::env::var("HOME") + .expect("no HOME env var. cannot get default config path."); + format!("{home}/.config/monitor/creds.toml") +} + #[derive(Debug, Clone, Subcommand)] enum Command { /// Runs syncs on resource files Sync { /// The path of the resource folder / file /// Folder paths will recursively incorporate all the resources it finds under the folder - #[arg(default_value_t = default_path())] + #[arg(default_value_t = String::from("./resources"))] path: String, }, @@ -49,12 +55,6 @@ enum Command { }, } -fn default_path() -> String { - let home = std::env::var("HOME") - .expect("no HOME env var. cannot get default config path."); - format!("{home}/.config/monitor/creds.toml") -} - #[derive(Debug, Deserialize)] struct CredsFile { url: String, diff --git a/runfile.toml b/runfile.toml index 79cae00c2..55118ac58 100644 --- a/runfile.toml +++ b/runfile.toml @@ -15,8 +15,8 @@ cmd = "yarn dev" path = "frontend" cmd = "yarn build" -[monrun-sync] -path = "bin/monrun" +[monitor-sync] +path = "bin/cli" cmd = "cargo run -- sync" [doc-dev-server]