1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-10-01 08:44:09 +02:00

spelling fixes in src

This commit is contained in:
Robin Appelman 2026-09-23 15:10:49 +02:00
commit 179430178f
9 changed files with 37 additions and 47 deletions

View file

@ -507,7 +507,7 @@ pub enum HazeCommand {
/// Edit a file in the instance with $EDITOR on the host /// Edit a file in the instance with $EDITOR on the host
#[strum(props(Args = "[path] file to edit"))] #[strum(props(Args = "[path] file to edit"))]
Edit, Edit,
/// Reload the php configuration in the instance /// Reload the PHP configuration in the instance
#[strum(props( #[strum(props(
Details = "note: you can overwrite <yellow>php.ini</yellow> settings with <literal>haze</literal> <arg>[filter]</arg> <literal>edit /config/php.ini</literal>" Details = "note: you can overwrite <yellow>php.ini</yellow> settings with <literal>haze</literal> <arg>[filter]</arg> <literal>edit /config/php.ini</literal>"
))] ))]

View file

@ -808,7 +808,8 @@ impl Cloud {
&& match filter.as_ref() { && match filter.as_ref() {
Some(filter) => cloud_id.contains(filter), Some(filter) => cloud_id.contains(filter),
None => true, None => true,
} { }
{
let entry = containers_by_id.entry(cloud_id.to_string()).or_default(); let entry = containers_by_id.entry(cloud_id.to_string()).or_default();
if labels.get("haze-type").map(String::as_str) == Some("cloud") { if labels.get("haze-type").map(String::as_str) == Some("cloud") {
entry.0 = Some(container); entry.0 = Some(container);

View file

@ -7,8 +7,8 @@ use std::convert::TryFrom;
use std::env::home_dir; use std::env::home_dir;
use std::fs::read_to_string; use std::fs::read_to_string;
use std::net::IpAddr; use std::net::IpAddr;
use toml::map::Map;
use toml::Value; use toml::Value;
use toml::map::Map;
#[derive(Debug, Deserialize, Default)] #[derive(Debug, Deserialize, Default)]
#[serde(from = "RawHazeConfig")] #[serde(from = "RawHazeConfig")]
@ -208,7 +208,7 @@ pub struct ProxyConfig {
} }
impl 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 { pub fn addr(&self, id: &str, ip: IpAddr) -> String {
let clean_id = id.strip_prefix("haze-").unwrap_or(id); let clean_id = id.strip_prefix("haze-").unwrap_or(id);
match (&self.address, self.https) { match (&self.address, self.https) {

View file

@ -75,7 +75,7 @@ pub async fn exec_tty<S1: AsRef<str>, S2: Into<String>, Env: Into<String>>(
} }
}); });
// 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()?; let mut stdout = stdout.lock().into_raw_mode().into_diagnostic()?;
// pipe docker exec output into stdout // pipe docker exec output into stdout

View file

@ -1,12 +1,12 @@
use crate::config::HazeConfig;
use crate::Result; use crate::Result;
use crate::config::HazeConfig;
use camino::{Utf8Path, Utf8PathBuf}; use camino::{Utf8Path, Utf8PathBuf};
use git2::build::CheckoutBuilder; use git2::build::CheckoutBuilder;
use git2::{Branch, BranchType, Repository, RepositoryState}; use git2::{Branch, BranchType, Repository, RepositoryState};
use indicatif::{MultiProgress, ProgressBar, ProgressStyle}; use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
use miette::{Context, IntoDiagnostic, Report}; use miette::{Context, IntoDiagnostic, Report};
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use rayon::ThreadPoolBuilder; use rayon::ThreadPoolBuilder;
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use std::fs::read_dir; use std::fs::read_dir;
use std::iter::once; use std::iter::once;
use std::path::PathBuf; use std::path::PathBuf;

View file

@ -206,7 +206,7 @@ pub trait ServiceTrait {
"bash" "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) /// 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 /// But instead for cases where the instance is mostly usable, but might have some missing features
@ -264,18 +264,18 @@ pub enum ServiceType {
S3mb, S3mb,
/// Azure Primary storage and external storage /// Azure Primary storage and external storage
Azure, Azure,
/// Ldap user backend /// LDAP user backend
Ldap, Ldap,
/// Ldap admin interface /// LDAP admin interface
LdapAdmin, LdapAdmin,
/// OnlyOffice /// OnlyOffice
#[strum(serialize = "onlyoffice", serialize = "only-office")] #[strum(serialize = "onlyoffice", serialize = "only-office")]
OnlyOffice, OnlyOffice,
/// Libre office online /// LibreOffice online
Office, Office,
/// notify_push /// notify_push
Push, Push,
/// Smb external storage /// SMB external storage
Smb, Smb,
/// Database sharding /// Database sharding
#[strum(serialize = "sharding", serialize = "sharded")] #[strum(serialize = "sharding", serialize = "sharded")]
@ -293,17 +293,17 @@ pub enum ServiceType {
SingleShard, SingleShard,
/// WebDav external storage /// WebDav external storage
Dav, Dav,
/// Sftp external storage /// SFTP external storage
Sftp, Sftp,
/// Sftp external storage with public key authentication /// SFTP external storage with public key authentication
SftpKey, SftpKey,
/// ownCloud instance for migration /// ownCloud instance for migration
Oc, Oc,
/// Imaginary for preview generation /// Imaginary for preview generation
Imaginary, Imaginary,
/// Kaspersky antivirus in http mode /// Kaspersky antivirus in HTTP mode
Kaspersky, Kaspersky,
/// Kaspersky antivirus in icap mode /// Kaspersky antivirus in ICAP mode
KasperskyIcap, KasperskyIcap,
/// Kaspersky antivirus in local binary /// Kaspersky antivirus in local binary
#[strum(serialize = "clamav", serialize = "clam")] #[strum(serialize = "clamav", serialize = "clam")]
@ -314,23 +314,23 @@ pub enum ServiceType {
/// Kaspersky antivirus in local socket mode /// Kaspersky antivirus in local socket mode
#[strum(serialize = "clamav-socket", serialize = "clam-socket")] #[strum(serialize = "clamav-socket", serialize = "clam-socket")]
ClamAvSocket, ClamAvSocket,
/// Kaspersky antivirus in icap mode /// Kaspersky antivirus in ICAP mode
#[strum(serialize = "clamav-icap", serialize = "clam-icap")] #[strum(serialize = "clamav-icap", serialize = "clam-icap")]
ClamAvIcap, ClamAvIcap,
/// Kaspersky antivirus in icap mode with TLS /// Kaspersky antivirus in ICAP mode with TLS
#[strum(serialize = "clamav-icap-tls", serialize = "clam-icap-tls")] #[strum(serialize = "clamav-icap-tls", serialize = "clam-icap-tls")]
ClamAvIcapTls, ClamAvIcapTls,
/// Mail server /// Mail server
Mail, Mail,
/// External redis instance /// External Redis instance
Redis, Redis,
/// External redis instance with TLS /// External Redis instance with TLS
RedisTls, RedisTls,
/// Use FrankenPHP instead of PHP-FPM /// Use FrankenPHP instead of PHP-FPM
FrankenPhp, FrankenPhp,
/// Webhook test listener /// Webhook test listener
Webhook, Webhook,
/// Enable DB partitioning for mariadb /// Enable DB partitioning for MariaDB
Partitioning, Partitioning,
/// Authentik identity provider /// Authentik identity provider
Authentik, Authentik,
@ -465,7 +465,7 @@ impl Service {
} }
// Remove duplicate services. // 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<Item = Service>) -> Vec<Service> { pub fn deduplicate_services(services: impl IntoIterator<Item = Service>) -> Vec<Service> {
let mut collected = Vec::new(); let mut collected = Vec::new();
for service in services { for service in services {

View file

@ -122,7 +122,7 @@ async fn spawn_authentik(
if !config.proxy.address.is_empty() { if !config.proxy.address.is_empty() {
let url = config.proxy.addr_with_port( let url = config.proxy.addr_with_port(
&container_name(cloud_id, "server"), &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, AUTHENTIK_PORT,
); );
env.push(format!("AUTHENTIK_WEB__BASE_URL={url}")); env.push(format!("AUTHENTIK_WEB__BASE_URL={url}"));

View file

@ -1,14 +1,14 @@
use crate::Result;
use crate::cloud::CloudOptions; use crate::cloud::CloudOptions;
use crate::config::HazeConfig; use crate::config::HazeConfig;
use crate::exec::exec; use crate::exec::exec;
use crate::image::pull_image; use crate::image::pull_image;
use crate::service::{split_cmnd, ServiceTrait}; use crate::service::{ServiceTrait, split_cmnd};
use crate::Result; use bollard::Docker;
use bollard::models::{ use bollard::models::{
ContainerCreateBody, ContainerState, EndpointSettings, HostConfig, NetworkingConfig, ContainerCreateBody, ContainerState, EndpointSettings, HostConfig, NetworkingConfig,
}; };
use bollard::query_parameters::CreateContainerOptions; use bollard::query_parameters::CreateContainerOptions;
use bollard::Docker;
use maplit::hashmap; use maplit::hashmap;
use miette::{IntoDiagnostic, WrapErr}; use miette::{IntoDiagnostic, WrapErr};
use serde_json::Value; use serde_json::Value;
@ -260,17 +260,6 @@ impl ServiceTrait for ObjectStore {
split_cmnd("occ files_external:config 1 secret minio123"), split_cmnd("occ files_external:config 1 secret minio123"),
split_cmnd("mc alias set s3 http://s3:9000 minio 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()), _ => Ok(Vec::new()),
} }
} }