File size: 932 Bytes
7c3ad90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash

set -eo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

cd "$ROOT_DIR"

echo "[dev-local] stopping stale Cloud V2 listeners…"
for port in 3000 3001 3002 3102; do
  pids="$(lsof -tiTCP:"$port" -sTCP:LISTEN 2>/dev/null || true)"
  if [[ -n "$pids" ]]; then
    kill $pids
  fi
done

udp_pids="$(lsof -tiUDP:8000 2>/dev/null || true)"
if [[ -n "$udp_pids" ]]; then
  kill $udp_pids
fi

echo "[dev-local] starting local Mongo and Redis…"
bun run setup:test

if ! command -v doppler >/dev/null 2>&1; then
  echo "[dev-local] Doppler CLI is required for Cloud V2 server credentials." >&2
  echo "[dev-local] Install it, then run: doppler login" >&2
  exit 1
fi

echo "[dev-local] starting Core, Runtime, and Test OEM with mock audio…"
exec doppler run \
  --project cloud-v2 \
  --config dev \
  -- \
  env AUDIO_PROVIDER=mock bun scripts/dev-stack.ts