Template
Read CI env from Infisical and give the local stack its own ports
CI reads Infisical staging as the read-only convexmonorepo-base-ci machine identity, runs the quality gate, and builds and pushes the image. The template is not deployed, so there is no Convex or VPS deploy step. The local stack moves to its own Compose name and ports so it runs beside the Payload template's, and it syncs the Convex runtime env. The scripts pick up Infisical account switching, dev-kill and a cache-safe CI install.
This commit is contained in:
1 parent
55b253257b
commit
8f09a423d4
18 files changed
+452
-55
No files matched your search
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Kill any lingering host-level dev servers (Next.js, Expo Metro, Convex CLI
|
||||
# watchers, turbo orchestrators) that survived a Ctrl-C. Does not touch the
|
||||
# dockerized Convex/Postgres stack — use `bun db:down` for that.
|
||||
#
|
||||
# Usage: scripts/dev-kill (wired as `bun dev:kill`)
|
||||
set -euo pipefail
|
||||
|
||||
info() { printf '\033[36m▶ %s\033[0m\n' "$*"; }
|
||||
ok() { printf '\033[32m✓ %s\033[0m\n' "$*"; }
|
||||
|
||||
PORTS=(3000 3001 8081 19000 19001 19002)
|
||||
PATTERNS=('next-server' 'next dev' 'expo start' 'turbo run dev' 'convex dev')
|
||||
|
||||
killed=false
|
||||
|
||||
for port in "${PORTS[@]}"; do
|
||||
pids="$(lsof -ti "tcp:$port" -sTCP:LISTEN 2>/dev/null || true)"
|
||||
[ -z "$pids" ] && continue
|
||||
for pid in $pids; do
|
||||
cmd="$(ps -p "$pid" -o comm= 2>/dev/null || true)"
|
||||
info "Killing $cmd (pid $pid) on port $port"
|
||||
kill "$pid" 2>/dev/null || true
|
||||
killed=true
|
||||
done
|
||||
done
|
||||
|
||||
for pattern in "${PATTERNS[@]}"; do
|
||||
pids="$(pgrep -f "$pattern" 2>/dev/null || true)"
|
||||
[ -z "$pids" ] && continue
|
||||
for pid in $pids; do
|
||||
info "Killing '$pattern' (pid $pid)"
|
||||
kill "$pid" 2>/dev/null || true
|
||||
killed=true
|
||||
done
|
||||
done
|
||||
|
||||
if [ "$killed" = true ]; then
|
||||
sleep 1
|
||||
ok "Dev servers stopped."
|
||||
else
|
||||
ok "No dev servers were running."
|
||||
fi
|
||||
Reference in new issue
Block a user