e223278771
- Easy docker push (MQTTower ergonomics + the image push it lacks): VERSION file → version-tag.yml (semver-guard auto-tag) → docker-publish.yml (buildx multi-arch → GHCR, registry centralized for one-line retarget to git.finalfactory.de) + ci.yml + build-and-push.ps1. - Verified end to end: deploy/Dockerfile builds; docker compose stack (app + timescaledb) comes up healthy; /healthz and the dashboard respond in-container. - JSON config export/import (ExportService) with id remapping on restore + GET /export, POST /import endpoints; round-trip test preserves meter→type, meter-scoped tariff, category links. - README, HA/Tasmota/MQTT wiring guide (docs/wiring.md), Unraid template. - CLAUDE.md updated to reflect the built codebase. - i18n: locale-aware number/currency formatting (de-DE); full de UI string localization deferred. 95 tests green (56 Core + 39 integration). Claude-Session: https://claude.ai/code/session_01WujdMtMJPbxDpDnMeK22rr
33 lines
1.0 KiB
PowerShell
33 lines
1.0 KiB
PowerShell
#!/usr/bin/env pwsh
|
|
# Local convenience: build the multi-arch MeterVault image and push it.
|
|
# Usage: ./deploy/build-and-push.ps1 -Registry ghcr.io -Image finalfactory/metervault
|
|
# Version is read from the VERSION file; images are tagged :<version> and :latest.
|
|
|
|
param(
|
|
[string]$Registry = "ghcr.io",
|
|
[string]$Image = "finalfactory/metervault",
|
|
[string[]]$Platforms = @("linux/amd64", "linux/arm64"),
|
|
[switch]$Push
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$version = (Get-Content (Join-Path $root "VERSION")).Trim()
|
|
$ref = "$Registry/$Image"
|
|
|
|
Write-Host "Building $ref:$version ($($Platforms -join ', '))" -ForegroundColor Cyan
|
|
|
|
$args = @(
|
|
"buildx", "build",
|
|
"--platform", ($Platforms -join ","),
|
|
"-f", (Join-Path $root "deploy/Dockerfile"),
|
|
"-t", "$ref`:$version",
|
|
"-t", "$ref`:latest"
|
|
)
|
|
if ($Push) { $args += "--push" } else { $args += "--load" }
|
|
$args += $root
|
|
|
|
& docker @args
|
|
if ($LASTEXITCODE -ne 0) { throw "docker buildx build failed" }
|
|
Write-Host "Done." -ForegroundColor Green
|