From f723e3f0bc162487411e6199e59fc9309664aa17 Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Wed, 29 Apr 2026 21:36:45 +0100 Subject: [PATCH] chore(deploy): add whisper-worker, --redeploy flag, usage hints Co-Authored-By: Claude Sonnet 4.6 --- scripts/deploy-dev.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/scripts/deploy-dev.sh b/scripts/deploy-dev.sh index b2292fc..552023f 100755 --- a/scripts/deploy-dev.sh +++ b/scripts/deploy-dev.sh @@ -2,7 +2,14 @@ # ============================================================================= # Deploy script for optical-dev.oliver.solutions # Run from: /opt/video-accessibility/ -# Usage: ./scripts/deploy-dev.sh [--skip-build] [--skip-frontend] [--skip-migrations] +# +# Usage: +# First deploy: ./scripts/deploy-dev.sh +# Code-only: ./scripts/deploy-dev.sh --redeploy +# Custom: ./scripts/deploy-dev.sh [--skip-build] [--skip-frontend] [--skip-migrations] +# +# --redeploy shorthand for --skip-build --skip-frontend --skip-migrations +# (just git pull + docker up -d, no rebuilds) # ============================================================================= set -euo pipefail @@ -15,8 +22,8 @@ COMPOSE="docker compose -f docker-compose.yml -f docker-compose.prod.yml --env-f API_INTERNAL_PORT=8000 # host port the api container exposes VITE_BASE="/video-accessibility" -# Services built sequentially (heaviest last, whisper skipped — download takes forever) -BUILD_SERVICES="api worker ffmpeg-worker tts-worker" +# Services built sequentially — whisper last (downloads ~1.5 GB model on first build) +BUILD_SERVICES="api worker ffmpeg-worker tts-worker whisper-worker" # ── Flags ───────────────────────────────────────────────────────────────────── SKIP_BUILD=false @@ -24,6 +31,7 @@ SKIP_FRONTEND=false SKIP_MIGRATIONS=false for arg in "$@"; do case $arg in + --redeploy) SKIP_BUILD=true; SKIP_FRONTEND=true; SKIP_MIGRATIONS=true ;; --skip-build) SKIP_BUILD=true ;; --skip-frontend) SKIP_FRONTEND=true ;; --skip-migrations) SKIP_MIGRATIONS=true ;; @@ -231,8 +239,10 @@ main() { echo " API: https://optical-dev.oliver.solutions/video-accessibility/api/v1/health" echo " Docs: https://optical-dev.oliver.solutions/video-accessibility/docs" echo "" - echo "Logs: docker compose -f docker-compose.yml -f docker-compose.prod.yml logs -f api" - echo "Rerun: ./scripts/deploy-dev.sh --skip-build --skip-frontend" + echo "Logs: docker compose -f docker-compose.yml -f docker-compose.prod.yml logs -f api" + echo "Redeploy: ./scripts/deploy-dev.sh --redeploy # just pull + restart" + echo "Code+front: ./scripts/deploy-dev.sh --skip-build # rebuild frontend, skip docker build" + echo "Full: ./scripts/deploy-dev.sh # everything from scratch" } main "$@"