Initial OSS scaffold from Songs2VID (pre-strip)

This commit is contained in:
Songs2VID Support
2026-08-03 06:15:05 +02:00
commit 506d56fa92
195 changed files with 25023 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
# Build multi-arch production image and optionally push to Docker Hub.
# Usage:
# ./scripts/release-cloud.sh # build locally (current arch)
# ./scripts/release-cloud.sh --push # build+push linux/amd64,linux/arm64
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
IMAGE="${DOCKER_IMAGE:-atakanozban/songs2vid}"
TAG="${DOCKER_TAG:-latest}"
FULL="${IMAGE}:${TAG}"
echo "==> Prisma generate"
npx prisma generate
echo "==> Typecheck / lint (optional soft)"
npm run lint || true
echo "==> Watermark unit checks"
npx tsx scripts/watermark.test.ts
if [[ "${1:-}" == "--push" ]]; then
echo "==> Multi-arch build+push ${FULL} (amd64,arm64)"
docker buildx create --name s2yt-builder --use 2>/dev/null || docker buildx use s2yt-builder
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t "$FULL" \
--push \
.
echo "Pushed ${FULL}. Deploy on songs2vid.com host with deploy/songs2vid/docker-compose.yml"
else
echo "==> Local docker build ${FULL}"
docker build -t "$FULL" .
echo "Built ${FULL}. Re-run with --push for Hub multi-arch."
fi