Add WAL file for database and log instance deployment failures
Some checks failed
Build and Publish Docker Image / build-and-push (push) Has been cancelled

This commit is contained in:
Matt Batchelder
2026-02-19 08:27:54 -05:00
parent 4a903bfd2a
commit adf1a2e4db
41 changed files with 2789 additions and 1297 deletions

View File

@@ -8,12 +8,34 @@ public static class AppConstants
public const string AdminRole = "Admin";
public const string ViewerRole = "Viewer";
// ── Global Docker secret names ──────────────────────────────────────────
/// <summary>Docker secret name for the global SMTP password.</summary>
public const string GlobalSmtpSecretName = "global_smtp_password";
/// <summary>Build a per-customer MySQL password secret name.</summary>
public static string CustomerMysqlSecretName(string customerName)
=> $"{SanitizeName(customerName)}_mysql_password";
/// <summary>Docker secret name for the shared MySQL host address.</summary>
public const string GlobalMysqlHostSecretName = "global_mysql_host";
/// <summary>Docker secret name for the shared MySQL port.</summary>
public const string GlobalMysqlPortSecretName = "global_mysql_port";
// ── Per-instance Docker secret name builders ────────────────────────────
/// <summary>Build a per-instance MySQL password secret name from the 3-letter abbreviation.</summary>
public static string CustomerMysqlPasswordSecretName(string abbrev)
=> $"{abbrev}-cms-db-password";
/// <summary>Build a per-instance MySQL username secret name from the 3-letter abbreviation.</summary>
public static string CustomerMysqlUserSecretName(string abbrev)
=> $"{abbrev}-cms-db-user";
/// <summary>Returns all per-instance MySQL secret names for a given abbreviation.</summary>
public static string[] AllCustomerMysqlSecretNames(string abbrev)
=> new[]
{
CustomerMysqlPasswordSecretName(abbrev),
CustomerMysqlUserSecretName(abbrev),
};
/// <summary>Sanitize a customer name for use in Docker/secret names.</summary>
public static string SanitizeName(string name)

View File

@@ -72,5 +72,5 @@ public class InstanceDefaultsOptions
public string LibraryShareSubPath { get; set; } = "{abbrev}-cms-library";
public string MySqlDatabaseTemplate { get; set; } = "{abbrev}_cms_db";
public string MySqlUserTemplate { get; set; } = "{abbrev}_cms";
public string MySqlUserTemplate { get; set; } = "{abbrev}_cms_user";
}