초기 관제 시스템 뼈대 구성

This commit is contained in:
2026-06-06 14:58:54 +09:00
parent d982777718
commit cab7394b1f
29 changed files with 3221 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
param(
[string]$DataDir = "runtime-data",
[string]$BackupDir = "backups"
)
$ErrorActionPreference = "Stop"
$root = (Resolve-Path ".").Path
$resolvedDataDir = Resolve-Path $DataDir
if (-not $resolvedDataDir.Path.StartsWith($root)) {
throw "Refusing to back up a path outside the repository: $($resolvedDataDir.Path)"
}
New-Item -ItemType Directory -Path $BackupDir -Force | Out-Null
$timestamp = Get-Date -Format "yyyyMMdd-HHmmss"
$archivePath = Join-Path $BackupDir "cargoradar-runtime-$timestamp.zip"
Compress-Archive -Path (Join-Path $resolvedDataDir.Path "*") -DestinationPath $archivePath -Force
[pscustomobject]@{
Backup = (Resolve-Path $archivePath).Path
} | Format-List