v4.1 - Admin/onboarding
This commit is contained in:
+19
-2
@@ -2,7 +2,13 @@
|
||||
param(
|
||||
[switch]$Force,
|
||||
[switch]$SkipSiteCheck,
|
||||
[string]$Service
|
||||
[string]$Service,
|
||||
# When set, the next mail-api boot copies admin state (client_profiles,
|
||||
# allowed_emails, drafts) from the on-disk JSON files into the shared
|
||||
# postgres database, overwriting anything currently in admin_kv. After the
|
||||
# deploy completes the flag is automatically reset to 'auto' for subsequent
|
||||
# boots so we don't keep overwriting live data.
|
||||
[switch]$SeedAdminData
|
||||
)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -242,6 +248,9 @@ Write-Host "[deploy] SSH config: $SshConfigPath"
|
||||
if (-not [string]::IsNullOrWhiteSpace($Service)) {
|
||||
Write-Host "[deploy] Target service: $Service"
|
||||
}
|
||||
if ($SeedAdminData) {
|
||||
Write-Host '[deploy] Admin data: seeding postgres from JSON on next mail-api boot'
|
||||
}
|
||||
if ([string]::IsNullOrWhiteSpace($SshKeyPath)) {
|
||||
Write-Host '[deploy] SSH auth: interactive password prompt'
|
||||
} else {
|
||||
@@ -254,6 +263,13 @@ Write-Host ' - Legacy WordPress/onboarding compose files are not used.'
|
||||
Write-Host ' - Remote .env files are preserved because they are not uploaded.'
|
||||
Write-Host ' - No global Docker prune/stop/delete commands are used.'
|
||||
Write-Host ' - Shared nginx will be updated and reloaded with the Docker-DNS-based config.'
|
||||
Write-Host ' - Subdomains served by this stack:'
|
||||
Write-Host ' goodwalk.co.nz / www.goodwalk.co.nz (marketing)'
|
||||
Write-Host ' onboarding.goodwalk.co.nz (client onboarding)'
|
||||
Write-Host ' admin.goodwalk.co.nz (owner admin dashboard)'
|
||||
if ($SeedAdminData) {
|
||||
Write-Host ' - Admin data seed: mail-api will OVERWRITE postgres admin_kv from the JSON volume.'
|
||||
}
|
||||
|
||||
if (-not $Force) {
|
||||
$confirmation = Read-Host "Type DEPLOY to continue with the remote path '$RemoteDeploymentPath'"
|
||||
@@ -310,7 +326,8 @@ try {
|
||||
$MaintenanceHostDir,
|
||||
'--maintenance-flag',
|
||||
$MaintenanceFlagPath
|
||||
) + $(if (-not [string]::IsNullOrWhiteSpace($Service)) { @('--service', $Service) } else { @() }))
|
||||
) + $(if (-not [string]::IsNullOrWhiteSpace($Service)) { @('--service', $Service) } else { @() }) `
|
||||
+ $(if ($SeedAdminData) { @('--seed-admin-data') } else { @() }))
|
||||
|
||||
Write-Host ''
|
||||
Write-Host '[deploy] Cleaning remote temporary files'
|
||||
|
||||
Reference in New Issue
Block a user