Files
Nexus/scripts/stop.sh
T
Hartmut 29235e3208
CI / Architecture Guardrails (pull_request) Successful in 2m21s
CI / Typecheck (pull_request) Successful in 2m50s
CI / Assistant Split Regression (pull_request) Successful in 4m35s
CI / Lint (pull_request) Successful in 4m46s
CI / Build (pull_request) Successful in 6m41s
CI / Unit Tests (pull_request) Successful in 7m59s
CI / E2E Tests (pull_request) Successful in 5m48s
CI / Fresh-Linux Docker Deploy (pull_request) Successful in 6m25s
CI / Release Images (pull_request) Has been skipped
rename(phase 1): cover .sh files missed by initial codemod
The Phase 1 codemod only scanned .ts/.tsx/.js/.mjs/.cjs/.json, so two
shell scripts that reference workspace packages stayed pointing at the
old `@capakraken/*` names. The dev container's entrypoint then printed
"No projects matched the filters in /app" on every pnpm --filter call,
the app never bound to port 3100, and Fresh-Linux Docker Deploy red on
run 154.

- tooling/docker/app-dev-start.sh: pnpm --filter @capakraken/{db,web}
  → @nexus/{db,web} (5 occurrences); /tmp/capakraken-dev-home → /tmp/
  nexus-dev-home
- scripts/stop.sh: /tmp/capakraken-dev.pid → /tmp/nexus-dev.pid

Deferred to Phase 3 (these reference live infrastructure, not package
names): scripts/harden-postgres.sh DB_USER/DB_NAME defaults, restart.sh
volume names capakraken_node_modules/_next, scripts/start.sh
pg_isready -U capakraken -d capakraken.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 16:11:16 +02:00

32 lines
877 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
echo "Stopping CapaKraken..."
# 1. Stop any legacy local dev server
if [ -f /tmp/nexus-dev.pid ]; then
PID=$(cat /tmp/nexus-dev.pid)
if kill -0 "$PID" 2>/dev/null; then
echo " Stopping Next.js (PID $PID)..."
kill "$PID" 2>/dev/null || true
sleep 1
kill -9 "$PID" 2>/dev/null || true
fi
rm -f /tmp/nexus-dev.pid
fi
# Also kill anything on port 3100 (cross-platform: lsof works on Linux + macOS)
if command -v lsof >/dev/null 2>&1; then
lsof -ti:3100 2>/dev/null | xargs kill 2>/dev/null || true
elif command -v fuser >/dev/null 2>&1; then
fuser -k 3100/tcp 2>/dev/null || true
fi
# 2. Stop Docker services (keep data volumes)
echo " Stopping app, PostgreSQL and Redis..."
docker compose --profile full stop app postgres redis 2>/dev/null || true
echo ""
echo "CapaKraken stopped."