Skip to content

Commit

Permalink
Merge pull request #29 from illa-family/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
naj1n authored Sep 7, 2022
2 parents 186ea16 + 7c0c43c commit c40b5e3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "illa"
version = "1.0.0"
version = "1.0.1"
authors = ["ILLA <[email protected]>"]
edition = "2021"

Expand Down
19 changes: 18 additions & 1 deletion src/command/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ pub struct Cmd {
/// The port on which you want ILLA Builder to run
#[clap(short = 'p', long = "port", default_value = "80")]
port: u16,

/// The server address where you want to deploy
#[clap(
short = 's',
long = "server-addr",
default_value = "localhost",
value_name = "SERVER_ADDRESS"
)]
server_address: String,
}

impl Cmd {
Expand All @@ -56,7 +65,13 @@ impl Cmd {
let (self_host, cloud) = (self.self_host, self.cloud);
match (self_host, cloud) {
(true, _) => {
deploy_self_host(self.builder_version.as_ref(), self.port, spinner_style).await?
deploy_self_host(
self.builder_version.as_ref(),
self.port,
self.server_address.clone(),
spinner_style,
)
.await?
}
(_, true) => deploy_cloud(spinner_style).await?,
_ => unreachable!(),
Expand All @@ -68,6 +83,7 @@ impl Cmd {
async fn deploy_self_host(
version: Option<&String>,
port: u16,
server_addr: String,
progress_style: ProgressStyle,
) -> Result {
println!("{} Running a self-hosted installation...", ui::emoji::BUILD);
Expand Down Expand Up @@ -132,6 +148,7 @@ async fn deploy_self_host(
let builder_env = vec![
"GIN_MODE=release".to_string(),
format!("POSTGRES_PASSWORD={}", pg_pwd),
format!("SERVER_ADDRESS={}", server_addr),
];
let mut builder_labels = HashMap::new();
builder_labels.insert(
Expand Down

0 comments on commit c40b5e3

Please sign in to comment.