Files
songs2vid/scripts/release-cloud.sh
T
Atakan Doğan ÖzbanandCursor c8015937f9 Align preview typography with FFmpeg output, add video/song title split, and ship OSS updates.
Separate YouTube video titles from on-video song/artist fields with Pro gating, serve curated fonts and watermark assets for 1:1 preview parity, and include billing/API/docs/deploy stack for self-hosted release.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 16:26:19 +02:00

38 lines
1.1 KiB
Bash

#!/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