From dd31c20cc783591702170af959dede5901ff6824 Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Wed, 11 Nov 2026 03:44:37 +0400 Subject: [PATCH] deploy: use Garage for object storage The storage stack replaces MinIO, abandoned upstream, with Garage. Point the app at garage:3900. Garage only accepts keys in its own format, so hash the existing ASXPIO_S3_* secrets into it the way storage's bootstrap does. The secrets stay as they are; a pair already in Garage's format is used unchanged. Assisted-by: Claude:fable-5-2 --- .forgejo/workflows/deploy.yaml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index f2ecdbd..f0cf59b 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -127,6 +127,21 @@ jobs: script: | umask 077 mkdir -p /opt/asxpio + # Garage only takes its own key format (id: GK + 24 hex digits, + # secret: 64 hex digits). Hash the MinIO-era secrets into it, as + # storage's init/garage-bootstrap.sh does; a pair already in + # Garage's format is used as it is. + garage_key_id() { + if printf '%s' "$1" | grep -Eq '^GK[0-9a-f]{24}$'; then printf '%s' "$1" + else printf 'GK%s' "$(printf '%s' "$1" | sha256sum | cut -c1-24)"; fi + } + garage_secret() { + if printf '%s' "$1" | grep -Eq '^[0-9a-f]{64}$'; then printf '%s' "$1" + else printf '%s' "$1" | sha256sum | cut -c1-64; fi + } + S3_ACCESS_KEY="$(garage_key_id "${ASXPIO_S3_ACCESS_KEY}")" + S3_SECRET_KEY="$(garage_secret "${ASXPIO_S3_SECRET_KEY}")" + cat > /opt/asxpio/.env <