Skip to content

PostgreSQL backup tool with Point-In-Time-Recovery and restore verification

REFACTOR (ci): Run CI on Namespace runners and keep Docker and dependency caches on Namespace, so builds stop rebuilding every layer on each commit

Rostislav Duginddc2ba49f82d
diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml
index 92d44f9b..c8867771 100644
--- a/.github/workflows/ci-release.yml
+++ b/.github/workflows/ci-release.yml
@@ -24,7 +24,7 @@ concurrency:
jobs:
lint-backend:
if: github.ref != 'refs/heads/develop' && github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 15
steps:
- name: Check out code
@@ -34,7 +34,12 @@ jobs:
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version: "1.26.3"
- cache-dependency-path: backend/go.sum
+ cache: false
+
+ - name: Set up Go cache
+ uses: namespacelabs/nscloud-cache-action@1124a6f3ce44e5cf84cc22111530961f4d2a15f9 # v1.7.0
+ with:
+ cache: go
- name: Download Go modules
run: |
@@ -67,7 +72,7 @@ jobs:
lint-frontend:
if: github.ref != 'refs/heads/develop' && github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 15
steps:
- name: Check out code
@@ -100,7 +105,7 @@ jobs:
dockerfile-scan:
if: github.ref != 'refs/heads/develop' && github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 15
permissions:
contents: read
@@ -124,7 +129,7 @@ jobs:
test-frontend:
if: github.ref != 'refs/heads/develop' && github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 15
needs: [lint-frontend]
steps:
@@ -140,8 +145,11 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "20"
- cache: "pnpm"
- cache-dependency-path: frontend/pnpm-lock.yaml
+
+ - name: Set up pnpm cache
+ uses: namespacelabs/nscloud-cache-action@1124a6f3ce44e5cf84cc22111530961f4d2a15f9 # v1.7.0
+ with:
+ cache: pnpm
- name: Install dependencies
run: |
@@ -155,7 +163,7 @@ jobs:
lint-verification-agent:
if: github.ref != 'refs/heads/develop' && github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 15
steps:
- name: Check out code
@@ -165,7 +173,12 @@ jobs:
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version: "1.26.3"
- cache-dependency-path: agent/verification/go.sum
+ cache: false
+
+ - name: Set up Go cache
+ uses: namespacelabs/nscloud-cache-action@1124a6f3ce44e5cf84cc22111530961f4d2a15f9 # v1.7.0
+ with:
+ cache: go
- name: Download Go modules
run: |
@@ -190,7 +203,7 @@ jobs:
test-verification-agent:
if: github.ref != 'refs/heads/develop' && github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 15
needs: [lint-verification-agent]
steps:
@@ -201,7 +214,12 @@ jobs:
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version: "1.26.3"
- cache-dependency-path: agent/verification/go.sum
+ cache: false
+
+ - name: Set up Go cache
+ uses: namespacelabs/nscloud-cache-action@1124a6f3ce44e5cf84cc22111530961f4d2a15f9 # v1.7.0
+ with:
+ cache: go
- name: Download Go modules
run: |
@@ -215,7 +233,7 @@ jobs:
e2e-verification-agent:
if: github.ref != 'refs/heads/develop' && github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 30
needs: [lint-verification-agent]
steps:
@@ -241,7 +259,7 @@ jobs:
e2e-verification-agent-podman:
if: github.ref != 'refs/heads/develop' && github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 30
needs: [lint-verification-agent]
steps:
@@ -278,24 +296,13 @@ jobs:
# 22.04 runs Linux 6.8. ubuntu-24.04 moved to Linux 7.0, where mongod 9.0 exits at startup:
# its kernel check reads Ubuntu's 7.0.0 release string as an rseq-incompatible kernel
# (SERVER-121912, SERVER-136848).
- runs-on: ubuntu-22.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-22-x64
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
group: [physical, logical, other]
steps:
- - name: Free disk space for database images
- run: |
- # The suite pre-pulls ~22 GB of database images, which the stock runner's free space does
- # not cover on its own. dotnet and the Android SDK are unused here and reclaim ~11 GB;
- # the four images MySQL 26 and MariaDB 13, 5.5 and 10.1 added ~3 GB on top of what the
- # first two lines used to be enough for, so Haskell and Swift go as well (~8 GB more).
- # The hosted tool cache is deliberately left alone — setup-go installs into it below.
- sudo rm -rf /usr/share/dotnet /usr/local/lib/android
- sudo rm -rf /opt/ghc /usr/local/.ghcup /usr/share/swift
- df -h /
-
- name: Check out code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
@@ -303,7 +310,12 @@ jobs:
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version: "1.26.3"
- cache-dependency-path: backend/go.sum
+ cache: false
+
+ - name: Set up Go cache
+ uses: namespacelabs/nscloud-cache-action@1124a6f3ce44e5cf84cc22111530961f4d2a15f9 # v1.7.0
+ with:
+ cache: go
- name: Install database client dependencies
run: |
@@ -395,15 +407,12 @@ jobs:
test-filesystems:
if: github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 45
steps:
- name: Check out code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
-
- name: Install network filesystem clients
run: sudo apt-get update && sudo apt-get install -y cifs-utils nfs-common
@@ -414,8 +423,6 @@ jobs:
push: false
load: true
platforms: linux/amd64
- cache-to: type=gha,mode=max,scope=storage-build-amd64
- cache-from: type=gha,scope=storage-build-amd64
build-args: |
APP_VERSION=storage-${{ github.sha }}
tags: databasus-storage-test:${{ github.sha }}
@@ -431,16 +438,13 @@ jobs:
run: just test-filesystem
build-dev-image:
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 45
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
steps:
- name: Check out code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
-
- name: Build amd64 dev image and load locally
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
with:
@@ -448,8 +452,6 @@ jobs:
push: false
load: true
platforms: linux/amd64
- cache-to: type=gha,mode=max,scope=dev-build-amd64
- cache-from: type=gha,scope=dev-build-amd64
build-args: |
APP_VERSION=dev-${{ github.sha }}
tags: |
@@ -576,17 +578,14 @@ jobs:
include:
- arch: amd64
platform: linux/amd64
- runner: ubuntu-24.04
+ runner: namespace-profile-8vcpu-16ram-ubuntu-26-x64
- arch: arm64
platform: linux/arm64
- runner: ubuntu-24.04-arm
+ runner: namespace-profile-8vcpu-16ram-ubuntu-26-arm
steps:
- name: Check out code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
-
- name: Log in to Docker Hub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
@@ -599,8 +598,6 @@ jobs:
with:
context: .
platforms: ${{ matrix.platform }}
- cache-from: type=gha,scope=dev-build-${{ matrix.arch }}
- cache-to: type=gha,mode=max,scope=dev-build-${{ matrix.arch }}
build-args: |
APP_VERSION=dev-${{ github.sha }}
outputs: type=image,name=databasus/databasus-dev,push-by-digest=true,name-canonical=true,push=true
@@ -620,7 +617,7 @@ jobs:
retention-days: 1
merge-dev-image-manifest:
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 10
needs: [push-dev-image]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
@@ -634,9 +631,6 @@ jobs:
merge-multiple: true
path: /tmp/digests
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
-
- name: Log in to Docker Hub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
@@ -658,16 +652,13 @@ jobs:
build-image:
if: github.ref != 'refs/heads/develop' && github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 45
needs: [lint-backend, lint-frontend, lint-verification-agent, dockerfile-scan]
steps:
- name: Check out code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
-
- name: Build amd64 image and load locally
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
with:
@@ -675,8 +666,6 @@ jobs:
push: false
load: true
platforms: linux/amd64
- cache-to: type=gha,mode=max,scope=release-build-amd64
- cache-from: type=gha,scope=release-build-amd64
build-args: |
APP_VERSION=ci-${{ github.sha }}
tags: |
@@ -792,7 +781,7 @@ jobs:
build-verification-image:
if: github.ref != 'refs/heads/develop' && github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 45
needs: [lint-verification-agent, dockerfile-scan]
permissions:
@@ -801,9 +790,6 @@ jobs:
- name: Check out code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
-
# Validate the extension Dockerfile builds (amd64, representative major) on
# every PR; the full multi-arch matrix is built at release time below.
- name: Build verification image (amd64, no push)
@@ -814,11 +800,9 @@ jobs:
platforms: linux/amd64
build-args: |
PG_MAJOR=16
- cache-from: type=gha,scope=verification-postgres-16-amd64
- cache-to: type=gha,mode=min,scope=verification-postgres-16-amd64
determine-version:
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 10
needs: [lint-backend, test-backend, test-frontend, test-verification-agent, e2e-verification-agent, e2e-verification-agent-podman, test-filesystems]
if: ${{ github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip-release]') }}
@@ -920,17 +904,14 @@ jobs:
include:
- arch: amd64
platform: linux/amd64
- runner: ubuntu-24.04
+ runner: namespace-profile-8vcpu-16ram-ubuntu-26-x64
- arch: arm64
platform: linux/arm64
- runner: ubuntu-24.04-arm
+ runner: namespace-profile-8vcpu-16ram-ubuntu-26-arm
steps:
- name: Check out code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
-
- name: Log in to Docker Hub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
@@ -943,8 +924,6 @@ jobs:
with:
context: .
platforms: ${{ matrix.platform }}
- cache-from: type=gha,scope=release-build-${{ matrix.arch }}
- cache-to: type=gha,mode=max,scope=release-build-${{ matrix.arch }}
build-args: |
APP_VERSION=${{ needs.determine-version.outputs.new_version }}
outputs: type=image,name=databasus/databasus,push-by-digest=true,name-canonical=true,push=true
@@ -964,7 +943,7 @@ jobs:
retention-days: 1
merge-image-manifest:
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 10
needs: [determine-version, push-image]
if: ${{ needs.determine-version.outputs.should_release == 'true' }}
@@ -979,9 +958,6 @@ jobs:
merge-multiple: true
path: /tmp/digests
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
-
- name: Log in to Docker Hub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
@@ -1034,17 +1010,14 @@ jobs:
include:
- arch: amd64
platform: linux/amd64
- runner: ubuntu-24.04
+ runner: namespace-profile-8vcpu-16ram-ubuntu-26-x64
- arch: arm64
platform: linux/arm64
- runner: ubuntu-24.04-arm
+ runner: namespace-profile-8vcpu-16ram-ubuntu-26-arm
steps:
- name: Check out code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
-
- name: Log in to Docker Hub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
@@ -1065,8 +1038,6 @@ jobs:
with:
context: agent/verification/images/postgres
platforms: ${{ matrix.platform }}
- cache-from: type=gha,scope=verification-postgres-${{ matrix.major }}-${{ matrix.arch }}
- cache-to: type=gha,mode=min,scope=verification-postgres-${{ matrix.major }}-${{ matrix.arch }}
build-args: |
PG_MAJOR=${{ matrix.major }}
BASE_IMAGE=${{ steps.pinned-base-image.outputs.image }}
@@ -1087,7 +1058,7 @@ jobs:
retention-days: 1
merge-verification-image-manifest:
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 10
needs: [determine-version, push-verification-image]
if: ${{ needs.determine-version.outputs.should_release == 'true' }}
@@ -1105,9 +1076,6 @@ jobs:
merge-multiple: true
path: /tmp/digests
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
-
- name: Log in to Docker Hub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
@@ -1130,7 +1098,7 @@ jobs:
"${platform_image_refs[@]}"
release:
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 10
needs: [determine-version, merge-image-manifest]
if: ${{ needs.determine-version.outputs.should_release == 'true' }}
@@ -1256,7 +1224,7 @@ jobs:
prerelease: false
publish-helm-chart:
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 10
needs: [determine-version, merge-image-manifest]
if: ${{ needs.determine-version.outputs.should_release == 'true' }}
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index d03dd812..f086fc9c 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -22,7 +22,7 @@ jobs:
name: Analyze (${{ matrix.language }})
# A pull request from develop is analyzed by the push to main after its merge.
if: github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
permissions:
security-events: write
actions: read
@@ -48,6 +48,7 @@ jobs:
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version: "1.26.3"
+ cache: false
- name: Initialize CodeQL
uses: github/codeql-action/init@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
@@ -65,7 +66,7 @@ jobs:
name: Secret scan (gitleaks)
# A pull request from develop is scanned by the push to main after its merge.
if: github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 15
permissions:
contents: read
@@ -93,7 +94,7 @@ jobs:
name: Analyze (semgrep)
# A pull request from develop is scanned by the push to main after its merge.
if: github.head_ref != 'develop'
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 15
permissions:
contents: read
diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml
index d325b2e0..48355691 100644
--- a/.github/workflows/dependency-review.yml
+++ b/.github/workflows/dependency-review.yml
@@ -10,7 +10,7 @@ permissions:
jobs:
dependency-review:
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
steps:
- name: Check out code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml
index 0db1573d..8403f6af 100644
--- a/.github/workflows/deploy-website.yml
+++ b/.github/workflows/deploy-website.yml
@@ -18,7 +18,7 @@ concurrency:
jobs:
build:
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 15
defaults:
run:
@@ -31,8 +31,11 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "20"
+
+ - name: Set up npm cache
+ uses: namespacelabs/nscloud-cache-action@1124a6f3ce44e5cf84cc22111530961f4d2a15f9 # v1.7.0
+ with:
cache: npm
- cache-dependency-path: website/package-lock.json
- name: Set up Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
@@ -68,7 +71,7 @@ jobs:
permissions:
pages: write
id-token: write
- runs-on: ubuntu-24.04
+ runs-on: namespace-profile-8vcpu-16ram-ubuntu-26-x64
timeout-minutes: 15
needs: build
steps:
diff --git a/Dockerfile b/Dockerfile
index 5d90a98b..75f21dca 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,14 +3,15 @@ FROM --platform=$BUILDPLATFORM node:24-alpine AS frontend-build
WORKDIR /frontend
-# Add version for the frontend build
-ARG APP_VERSION=dev
-ENV VITE_APP_VERSION=$APP_VERSION
-
COPY frontend/package.json frontend/pnpm-lock.yaml ./
-RUN corepack enable && pnpm install --frozen-lockfile
+RUN --mount=type=cache,target=/pnpm/store \
+ corepack enable && pnpm install --frozen-lockfile --store-dir /pnpm/store
COPY frontend/ ./
+# APP_VERSION changes with every commit and invalidates the build cache of every
+# later instruction in its stage, so each stage declares it right before its use.
+ARG APP_VERSION=dev
+ENV VITE_APP_VERSION=$APP_VERSION
RUN pnpm build
# ========= BUILD BACKEND =========
@@ -56,7 +57,8 @@ RUN swag init -d . -g cmd/main.go -o swagger
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
-RUN CGO_ENABLED=0 \
+RUN --mount=type=cache,target=/root/.cache/go-build \
+ CGO_ENABLED=0 \
GOOS=$TARGETOS \
GOARCH=$TARGETARCH \
go build -o /app/main ./cmd
@@ -65,8 +67,6 @@ RUN CGO_ENABLED=0 \
# ========= BUILD VERIFICATION AGENT =========
FROM --platform=$BUILDPLATFORM golang:1.26.3 AS verification-agent-build
-ARG APP_VERSION=dev
-
WORKDIR /agent
COPY agent/verification/go.mod agent/verification/go.sum ./
@@ -74,11 +74,15 @@ RUN go mod download
COPY agent/verification/ ./
-RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
+ARG APP_VERSION=dev
+
+RUN --mount=type=cache,target=/root/.cache/go-build \
+ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -ldflags "-X main.Version=${APP_VERSION}" \
-o /verification-agent-binaries/databasus-verification-agent-linux-amd64 ./cmd
-RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 \
+RUN --mount=type=cache,target=/root/.cache/go-build \
+ CGO_ENABLED=0 GOOS=linux GOARCH=arm64 \
go build -ldflags "-X main.Version=${APP_VERSION}" \
-o /verification-agent-binaries/databasus-verification-agent-linux-arm64 ./cmd
@@ -92,11 +96,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 \
# adds another CVE to track.
FROM debian:bookworm-slim
-# Add version metadata to runtime image
-ARG APP_VERSION=dev
ARG TARGETARCH
-LABEL org.opencontainers.image.version=$APP_VERSION
-ENV APP_VERSION=$APP_VERSION
ENV CONTAINER_ARCH=$TARGETARCH
# Set production mode for Docker containers
@@ -187,6 +187,10 @@ COPY --chmod=0755 docker/start.sh /app/start.sh
LABEL org.opencontainers.image.source="https://github.com/databasus/databasus"
+ARG APP_VERSION=dev
+LABEL org.opencontainers.image.version=$APP_VERSION
+ENV APP_VERSION=$APP_VERSION
+
EXPOSE 4005
# Liveness probe: the runtime image ships no wget/curl, so the binary checks