Files
recap/docker_entrypoint.sh
T
Keysat 9282440143 Rename project: youtube-summarizer → recap
The product was always more than YouTube — it handles podcast feeds
too, and the upcoming multi-provider work makes it less Gemini-
specific. New name: Recap.

This is a coordinated identity change across:

  • StartOS package id: youtube-summarizer → recap
    (manifest.id; the .s9pk filename, Docker image namespace, and
    install path under StartOS all derive from this automatically)
  • Display name: "YouTube Summarizer" → "Recap"
    (manifest title, activation screen heading, page <title>, console
    log on boot, i18n strings, ABOUT.md, Dockerfile header,
    docker_entrypoint banner)
  • Keysat product slug: youtube-summarizer → recap
    (server/license.js PRODUCT_SLUG; frontend fallback strings)
  • Daemon subscription id: youtube-summarizer-sub → recap-sub
  • Env var prefix: YT_SUMMARIZER_* → RECAP_*
    (LICENSE_KEY, LICENSE_KEY_PATH, MAX_OFFLINE_DAYS,
    VALIDATE_INTERVAL_MS)
  • localStorage keys: yt-summarizer-* → recap-*
    (gemini-key, activation-skipped, clips)
  • Library export filename: youtube-summarizer-library.json →
    recap-library.json
  • npm package names: youtube-summarizer-{startos,server} → recap-*
  • Deploy paths: youtube-summarizer_x86_64.s9pk → recap_x86_64.s9pk
    (default values in bin/deploy.sh; .deploy.env on dev machine
    needs the same update before next push)
  • Self-hosted registry directory: startos-registry/packages/
    youtube-summarizer → .../recap (with package.json + INSTRUCTIONS
    rewritten)

What does NOT change:
  • Filesystem repo path (still /Users/.../youtube-summarizer/)
  • Git history / commit messages
  • Existing version files in startos/versions/ (kept as-is — the
    version chain belongs to the package's own history regardless of
    its display name)

User-side follow-ups required:
  1. Create "recap" product in Keysat admin, set up Core/Pro tier
     policies (same entitlements as before), mint a fresh test
     license. Old "youtube-summarizer" licenses won't activate
     against the new slug.
  2. Update .deploy.env (gitignored) so FILEBROWSER_PATH and
     REGISTRY_PUBLIC_URL point at recap_x86_64.s9pk.

StartOS will treat this as a brand-new app on install — existing
youtube-summarizer installs will not auto-migrate (acknowledged
intentional given no real users yet).
2026-05-08 13:35:27 -05:00

50 lines
1.4 KiB
Bash

#!/bin/sh
set -eu
DATA_DIR="/data"
HISTORY_DIR="$DATA_DIR/history"
CONFIG_DIR="$DATA_DIR/config"
BIN_DIR="$DATA_DIR/bin"
CACHE_DIR="$DATA_DIR/ytdlp-cache"
# Create directory structure on persistent volume
mkdir -p "$HISTORY_DIR" "$CONFIG_DIR" "$BIN_DIR" "$CACHE_DIR"
# Ensure the non-root user owns the data volume
# (on first boot the volume is root-owned; we need appuser to write)
chown -R 1001:1001 "$DATA_DIR"
# Use persistent yt-dlp binary if available (runtime updates go here)
if [ -x "$BIN_DIR/yt-dlp" ]; then
export PATH="$BIN_DIR:$PATH"
fi
# Point yt-dlp cache to persistent storage (stores OAuth tokens)
export XDG_CACHE_HOME="$CACHE_DIR"
# Load Gemini API key from StartOS config if available
if [ -f "$CONFIG_DIR/startos-config.json" ]; then
GEMINI_KEY=$(python3 -c "import sys,json; print(json.load(open('$CONFIG_DIR/startos-config.json')).get('gemini_api_key',''))" 2>/dev/null || echo "")
if [ -n "$GEMINI_KEY" ]; then
export GEMINI_API_KEY="$GEMINI_KEY"
fi
fi
# Also load from .env if it exists in data dir (user override)
if [ -f "$DATA_DIR/.env" ]; then
set -a
. "$DATA_DIR/.env"
set +a
fi
export DATA_DIR="$DATA_DIR"
export PORT="${PORT:-3001}"
export HOSTNAME="0.0.0.0"
echo "Starting Recap..."
echo " yt-dlp: $(yt-dlp --version 2>/dev/null || echo 'not found')"
echo " ffmpeg: $(ffmpeg -version 2>/dev/null | head -1 || echo 'not found')"
echo " Data: $DATA_DIR"
exec node /app/server/index.js