Files
rehearshalhub/scripts/build-containers.sh
2026-04-10 11:31:29 +02:00

23 lines
918 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
# Get current git tag, fall back to "latest" if no tags exist
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "latest")
echo "Building container images with tag: $TAG"
# Build all services using docker compose
docker compose build --no-cache
echo "Tagging images for Gitea registry..."
# Tag all images with the current git tag
# Format: git.sschuhmann.de/owner/rehearsalhub/service:tag
docker tag rehearsalhub/api:latest git.sschuhmann.de/sschuhmann/rehearshalhub/api:$TAG
docker tag rehearsalhub/web:latest git.sschuhmann.de/sschuhmann/rehearshalhub/web:$TAG
docker tag rehearsalhub/audio-worker:latest git.sschuhmann.de/sschuhmann/rehearshalhub/worker:$TAG
docker tag rehearsalhub/nc-watcher:latest git.sschuhmann.de/sschuhmann/rehearshalhub/watcher:$TAG
echo "Build complete! Images tagged as: $TAG"
echo "Ready for upload to git.sschuhmann.de/sschuhmann/rehearsalhub"