feat: add nginx reload and validation wrappers with sudo permissions

This commit is contained in:
GW_MC
2025-12-22 17:18:36 +08:00
parent 6e85bda13f
commit 5cffb0a519
7 changed files with 323 additions and 13 deletions

View File

@@ -20,6 +20,12 @@ struct Args {
db_type: String,
// agent related
/// agent image name
#[arg(long, default_value = "yanpm/agent", env = "AGENT_IMAGE_NAME")]
agent_image: String,
/// agent image tag
#[arg(long, default_value = "latest", env = "AGENT_IMAGE_TAG")]
agent_image_tag: String,
/// force build agent image
#[arg(long, default_value_t = false, env = "AGENT_FORCE_BUILD")]
agent_force_build: bool,
@@ -172,8 +178,8 @@ async fn parse_args() -> ParsedArgs {
db_type: args.db_type,
agent_container_config: Some(AgentContainerConfig {
// TODO: allow customization of these fields via CLI args
image: "yanpm-agent".to_string(),
tag: "latest".to_string(),
image: args.agent_image,
tag: args.agent_image_tag,
container_name: format!("yanpm-agent-container-{}", time),
dockerfile_path,
force_build: args.agent_force_build,