Skip to content

Commit

Permalink
enable protocols by default on Docker during setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Apr 24, 2023
1 parent bef3a29 commit 83be017
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions warpgate/src/commands/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ pub(crate) async fn command(cli: &crate::Cli) -> Result<()> {
}
});

store.http.enable = true;
if let Commands::UnattendedSetup { http_port, .. } = &cli.command {
store.http.enable = true;
store.http.listen = ListenEndpoint(SocketAddr::from(([0, 0, 0, 0], *http_port)));
} else {
if !is_docker() {
Expand All @@ -152,7 +152,9 @@ pub(crate) async fn command(cli: &crate::Cli) -> Result<()> {
store.ssh.listen = ListenEndpoint(SocketAddr::from(([0, 0, 0, 0], *ssh_port)));
}
} else {
if !is_docker() {
if is_docker() {
store.ssh.enable = true;
} else {
info!("You will now choose specific protocol listeners to be enabled.");
info!("");
info!("NB: Nothing will be exposed by default -");
Expand All @@ -178,7 +180,9 @@ pub(crate) async fn command(cli: &crate::Cli) -> Result<()> {
store.mysql.listen = ListenEndpoint(SocketAddr::from(([0, 0, 0, 0], *mysql_port)));
}
} else {
if !is_docker() {
if is_docker() {
store.mysql.enable = true;
} else {
store.mysql.enable = dialoguer::Confirm::with_theme(&theme)
.default(true)
.with_prompt("Accept MySQL connections?")
Expand Down

0 comments on commit 83be017

Please sign in to comment.