Legg til build.sh, run.sh og .env.example

build.sh bygger imaget med build-dato og git-revisjon, run.sh starter
containeren idempotent (podman run --replace) med innstillinger fra .env.
compose.yaml leser nå samme .env. Alle variabler har standardverdier;
.env.example dokumenterer dem.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JcEy43fNYpwg6K6oTKakWR
This commit is contained in:
Ole-Morten Duesund 2026-08-26 12:36:12 +02:00
commit 5f6fc252a7
6 changed files with 89 additions and 15 deletions

14
build.sh Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Bygger container-imaget localhost/soapbox:latest med build-metadata
# (tidsstempel og git-revisjon, med -dirty hvis arbeidstreet har endringer).
set -euo pipefail
cd "$(dirname "$0")"
TAG="${1:-localhost/soapbox:latest}"
BUILDAH_FORMAT=docker podman build \
--build-arg BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--build-arg GIT_REVISION="$(git describe --always --dirty 2>/dev/null || echo unknown)" \
-t "$TAG" .
echo "Bygde $TAG"