# Pull the live production configs from valhalla into this repo, so local # matches what's actually deployed. Run at the start of any session where # you'll edit deployment config. # # Production is the source of truth. This OVERWRITES the local copies of # docker-compose.yml, .env, and Caddyfile -- commit or stash first. # # Usage: powershell -File sync-prod.ps1 $ErrorActionPreference = "Stop" $PSNativeCommandUseErrorActionPreference = $true $server = "ginnoir@valhalla" $repoDir = $PSScriptRoot Write-Host "Syncing production configs from $server ..." scp "${server}:~/htpc-download-box/docker-compose.yml" "$repoDir\docker-compose.yml" scp "${server}:~/htpc-download-box/.env" "$repoDir\.env" scp "${server}:/config/caddy/Caddyfile" "$repoDir\Caddyfile" Write-Host "Done. Files synced:" Get-ChildItem $repoDir -File | Where-Object { $_.Name -in 'docker-compose.yml', '.env', 'Caddyfile' } | Select-Object Name, Length, LastWriteTime