diff --git a/src/args.rs b/src/args.rs
index 181db11..7e28603 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -507,7 +507,7 @@ pub enum HazeCommand {
/// Edit a file in the instance with $EDITOR on the host
#[strum(props(Args = "[path] file to edit"))]
Edit,
- /// Reload the php configuration in the instance
+ /// Reload the PHP configuration in the instance
#[strum(props(
Details = "note: you can overwrite php.ini settings with haze [filter] edit /config/php.ini"
))]
diff --git a/src/cloud.rs b/src/cloud.rs
index 6932d00..cbb8b5c 100644
--- a/src/cloud.rs
+++ b/src/cloud.rs
@@ -717,9 +717,9 @@ impl Cloud {
.await
.into_diagnostic()
.wrap_err("Failed to remove work directory")
- {
- eprintln!("{}", e);
- }
+ {
+ eprintln!("{}", e);
+ }
remove_worktrees_for_instance(config, &self.id).await?;
@@ -808,14 +808,15 @@ impl Cloud {
&& match filter.as_ref() {
Some(filter) => cloud_id.contains(filter),
None => true,
- } {
- let entry = containers_by_id.entry(cloud_id.to_string()).or_default();
- if labels.get("haze-type").map(String::as_str) == Some("cloud") {
- entry.0 = Some(container);
- } else {
- entry.1.push(container)
- }
}
+ {
+ let entry = containers_by_id.entry(cloud_id.to_string()).or_default();
+ if labels.get("haze-type").map(String::as_str) == Some("cloud") {
+ entry.0 = Some(container);
+ } else {
+ entry.1.push(container)
+ }
+ }
}
let mut sortable_containers: Vec<_> = containers_by_id
diff --git a/src/config.rs b/src/config.rs
index 8dfd52c..0b6355f 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -7,8 +7,8 @@ use std::convert::TryFrom;
use std::env::home_dir;
use std::fs::read_to_string;
use std::net::IpAddr;
-use toml::map::Map;
use toml::Value;
+use toml::map::Map;
#[derive(Debug, Deserialize, Default)]
#[serde(from = "RawHazeConfig")]
@@ -208,7 +208,7 @@ pub struct ProxyConfig {
}
impl ProxyConfig {
- /// Get a public address for a service, either with direct ip or through the proxy
+ /// Get a public address for a service, either with direct IP or through the proxy
pub fn addr(&self, id: &str, ip: IpAddr) -> String {
let clean_id = id.strip_prefix("haze-").unwrap_or(id);
match (&self.address, self.https) {
diff --git a/src/exec.rs b/src/exec.rs
index f077329..f206a32 100644
--- a/src/exec.rs
+++ b/src/exec.rs
@@ -75,7 +75,7 @@ pub async fn exec_tty, S2: Into, Env: Into>(
}
});
- // set stdout in raw mode so we can do tty stuff
+ // set stdout in raw mode so we can do TTY stuff
let mut stdout = stdout.lock().into_raw_mode().into_diagnostic()?;
// pipe docker exec output into stdout
diff --git a/src/git.rs b/src/git.rs
index 2469de5..53b49b2 100644
--- a/src/git.rs
+++ b/src/git.rs
@@ -1,12 +1,12 @@
-use crate::config::HazeConfig;
use crate::Result;
+use crate::config::HazeConfig;
use camino::{Utf8Path, Utf8PathBuf};
use git2::build::CheckoutBuilder;
use git2::{Branch, BranchType, Repository, RepositoryState};
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
use miette::{Context, IntoDiagnostic, Report};
-use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use rayon::ThreadPoolBuilder;
+use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use std::fs::read_dir;
use std::iter::once;
use std::path::PathBuf;
diff --git a/src/mapping.rs b/src/mapping.rs
index 6291c53..30b82ef 100644
--- a/src/mapping.rs
+++ b/src/mapping.rs
@@ -107,7 +107,7 @@ impl<'a> Mapping<'a> {
.wrap_err("Failed to create source file")?,
}
- // For worktrees, pre-create mountpoints within /var/www/html to prevent docker from creating them as root.
+ // For worktrees, pre-create mount points within /var/www/html to prevent docker from creating them as root.
if self.target.starts_with("/var/www/html") {
let local_target = source_root.join(
self.target
diff --git a/src/service.rs b/src/service.rs
index 42646fb..da3377a 100644
--- a/src/service.rs
+++ b/src/service.rs
@@ -206,7 +206,7 @@ pub trait ServiceTrait {
"bash"
}
- /// Allow services to delay the completion of the `start` command untill they are fully setup
+ /// Allow services to delay the completion of the `start` command until they are fully setup
///
/// This is not for services which are critical for the running of the instance (use `is_healthy` for that)
/// But instead for cases where the instance is mostly usable, but might have some missing features
@@ -264,18 +264,18 @@ pub enum ServiceType {
S3mb,
/// Azure Primary storage and external storage
Azure,
- /// Ldap user backend
+ /// LDAP user backend
Ldap,
- /// Ldap admin interface
+ /// LDAP admin interface
LdapAdmin,
/// OnlyOffice
#[strum(serialize = "onlyoffice", serialize = "only-office")]
OnlyOffice,
- /// Libre office online
+ /// LibreOffice online
Office,
/// notify_push
Push,
- /// Smb external storage
+ /// SMB external storage
Smb,
/// Database sharding
#[strum(serialize = "sharding", serialize = "sharded")]
@@ -293,17 +293,17 @@ pub enum ServiceType {
SingleShard,
/// WebDav external storage
Dav,
- /// Sftp external storage
+ /// SFTP external storage
Sftp,
- /// Sftp external storage with public key authentication
+ /// SFTP external storage with public key authentication
SftpKey,
/// ownCloud instance for migration
Oc,
/// Imaginary for preview generation
Imaginary,
- /// Kaspersky antivirus in http mode
+ /// Kaspersky antivirus in HTTP mode
Kaspersky,
- /// Kaspersky antivirus in icap mode
+ /// Kaspersky antivirus in ICAP mode
KasperskyIcap,
/// Kaspersky antivirus in local binary
#[strum(serialize = "clamav", serialize = "clam")]
@@ -314,23 +314,23 @@ pub enum ServiceType {
/// Kaspersky antivirus in local socket mode
#[strum(serialize = "clamav-socket", serialize = "clam-socket")]
ClamAvSocket,
- /// Kaspersky antivirus in icap mode
+ /// Kaspersky antivirus in ICAP mode
#[strum(serialize = "clamav-icap", serialize = "clam-icap")]
ClamAvIcap,
- /// Kaspersky antivirus in icap mode with TLS
+ /// Kaspersky antivirus in ICAP mode with TLS
#[strum(serialize = "clamav-icap-tls", serialize = "clam-icap-tls")]
ClamAvIcapTls,
/// Mail server
Mail,
- /// External redis instance
+ /// External Redis instance
Redis,
- /// External redis instance with TLS
+ /// External Redis instance with TLS
RedisTls,
/// Use FrankenPHP instead of PHP-FPM
FrankenPhp,
/// Webhook test listener
Webhook,
- /// Enable DB partitioning for mariadb
+ /// Enable DB partitioning for MariaDB
Partitioning,
/// Authentik identity provider
Authentik,
@@ -465,7 +465,7 @@ impl Service {
}
// Remove duplicate services.
-// Useful for Authentik as it is needed by saml and oidc.
+// Useful for Authentik as it is needed by SAML and OIDC.
pub fn deduplicate_services(services: impl IntoIterator- ) -> Vec {
let mut collected = Vec::new();
for service in services {
diff --git a/src/service/authentik/mod.rs b/src/service/authentik/mod.rs
index 86714f1..0703832 100644
--- a/src/service/authentik/mod.rs
+++ b/src/service/authentik/mod.rs
@@ -122,7 +122,7 @@ async fn spawn_authentik(
if !config.proxy.address.is_empty() {
let url = config.proxy.addr_with_port(
&container_name(cloud_id, "server"),
- IpAddr::V4(Ipv4Addr::LOCALHOST), // ip arg is unused when a proxy is configured
+ IpAddr::V4(Ipv4Addr::LOCALHOST), // IP argument is unused when a proxy is configured
AUTHENTIK_PORT,
);
env.push(format!("AUTHENTIK_WEB__BASE_URL={url}"));
diff --git a/src/service/objectstore.rs b/src/service/objectstore.rs
index 20e586c..64452c5 100644
--- a/src/service/objectstore.rs
+++ b/src/service/objectstore.rs
@@ -1,14 +1,14 @@
+use crate::Result;
use crate::cloud::CloudOptions;
use crate::config::HazeConfig;
use crate::exec::exec;
use crate::image::pull_image;
-use crate::service::{split_cmnd, ServiceTrait};
-use crate::Result;
+use crate::service::{ServiceTrait, split_cmnd};
+use bollard::Docker;
use bollard::models::{
ContainerCreateBody, ContainerState, EndpointSettings, HostConfig, NetworkingConfig,
};
use bollard::query_parameters::CreateContainerOptions;
-use bollard::Docker;
use maplit::hashmap;
use miette::{IntoDiagnostic, WrapErr};
use serde_json::Value;
@@ -260,17 +260,6 @@ impl ServiceTrait for ObjectStore {
split_cmnd("occ files_external:config 1 secret minio123"),
split_cmnd("mc alias set s3 http://s3:9000 minio minio123"),
]),
- // ObjectStore::S3s => Ok(vec![
- // "occ files_external:create s3 amazons3 amazons3::accesskey".into(),
- // "occ files_external:config 1 bucket ext".into(),
- // "occ files_external:config 1 hostname s3".into(),
- // "occ files_external:config 1 port 9000".into(),
- // "occ files_external:config 1 use_ssl true".into(),
- // "occ files_external:config 1 use_path_style true".into(),
- // "occ files_external:config 1 key minio".into(),
- // "occ files_external:config 1 secret minio123".into(),
- // "mc alias set s3 https://s3:9000 minio minio123".into(),
- // ]),
_ => Ok(Vec::new()),
}
}