rename(phase 1): cover .sh files missed by initial codemod
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
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
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>
This commit is contained in:
+3
-3
@@ -5,15 +5,15 @@ cd "$(dirname "$0")/.."
|
|||||||
echo "Stopping CapaKraken..."
|
echo "Stopping CapaKraken..."
|
||||||
|
|
||||||
# 1. Stop any legacy local dev server
|
# 1. Stop any legacy local dev server
|
||||||
if [ -f /tmp/capakraken-dev.pid ]; then
|
if [ -f /tmp/nexus-dev.pid ]; then
|
||||||
PID=$(cat /tmp/capakraken-dev.pid)
|
PID=$(cat /tmp/nexus-dev.pid)
|
||||||
if kill -0 "$PID" 2>/dev/null; then
|
if kill -0 "$PID" 2>/dev/null; then
|
||||||
echo " Stopping Next.js (PID $PID)..."
|
echo " Stopping Next.js (PID $PID)..."
|
||||||
kill "$PID" 2>/dev/null || true
|
kill "$PID" 2>/dev/null || true
|
||||||
sleep 1
|
sleep 1
|
||||||
kill -9 "$PID" 2>/dev/null || true
|
kill -9 "$PID" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
rm -f /tmp/capakraken-dev.pid
|
rm -f /tmp/nexus-dev.pid
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Also kill anything on port 3100 (cross-platform: lsof works on Linux + macOS)
|
# Also kill anything on port 3100 (cross-platform: lsof works on Linux + macOS)
|
||||||
|
|||||||
@@ -19,14 +19,14 @@ echo "Postgres is ready."
|
|||||||
CI=true pnpm install --frozen-lockfile
|
CI=true pnpm install --frozen-lockfile
|
||||||
|
|
||||||
# Regenerate Prisma client (needed after bind-mount overlays the image layer)
|
# Regenerate Prisma client (needed after bind-mount overlays the image layer)
|
||||||
pnpm --filter @capakraken/db db:generate
|
pnpm --filter @nexus/db db:generate
|
||||||
|
|
||||||
# Sync full schema to the DB first. The files under prisma/migrations/ are
|
# Sync full schema to the DB first. The files under prisma/migrations/ are
|
||||||
# idempotent SUPPLEMENTS (see "IF NOT EXISTS" guards in each migration.sql);
|
# idempotent SUPPLEMENTS (see "IF NOT EXISTS" guards in each migration.sql);
|
||||||
# they assume the base tables already exist from a prior `db push`. On a
|
# they assume the base tables already exist from a prior `db push`. On a
|
||||||
# fresh DB, migrate deploy alone would fail because the first incremental
|
# fresh DB, migrate deploy alone would fail because the first incremental
|
||||||
# migration references "users" before it exists.
|
# migration references "users" before it exists.
|
||||||
pnpm --filter @capakraken/db exec prisma db push --schema ./prisma/schema.prisma --accept-data-loss --skip-generate
|
pnpm --filter @nexus/db exec prisma db push --schema ./prisma/schema.prisma --accept-data-loss --skip-generate
|
||||||
|
|
||||||
# After db push the schema matches schema.prisma exactly, but the
|
# After db push the schema matches schema.prisma exactly, but the
|
||||||
# _prisma_migrations table is empty, which makes `migrate deploy` fail
|
# _prisma_migrations table is empty, which makes `migrate deploy` fail
|
||||||
@@ -35,17 +35,17 @@ pnpm --filter @capakraken/db exec prisma db push --schema ./prisma/schema.prisma
|
|||||||
# supplements (IF NOT EXISTS guards), so marking-as-applied is safe.
|
# supplements (IF NOT EXISTS guards), so marking-as-applied is safe.
|
||||||
for m in packages/db/prisma/migrations/*/; do
|
for m in packages/db/prisma/migrations/*/; do
|
||||||
name=$(basename "$m")
|
name=$(basename "$m")
|
||||||
pnpm --filter @capakraken/db exec prisma migrate resolve \
|
pnpm --filter @nexus/db exec prisma migrate resolve \
|
||||||
--applied "$name" --schema ./prisma/schema.prisma || true
|
--applied "$name" --schema ./prisma/schema.prisma || true
|
||||||
done
|
done
|
||||||
|
|
||||||
# Run pending migrations so a fresh checkout picks up incremental additions
|
# Run pending migrations so a fresh checkout picks up incremental additions
|
||||||
pnpm --filter @capakraken/db db:migrate:deploy
|
pnpm --filter @nexus/db db:migrate:deploy
|
||||||
|
|
||||||
pnpm check:exports
|
pnpm check:exports
|
||||||
pnpm check:imports
|
pnpm check:imports
|
||||||
|
|
||||||
repo_home="/tmp/capakraken-dev-home"
|
repo_home="/tmp/nexus-dev-home"
|
||||||
|
|
||||||
# Cross-platform stat: GNU stat uses -c, BSD/macOS stat uses -f
|
# Cross-platform stat: GNU stat uses -c, BSD/macOS stat uses -f
|
||||||
if stat -c '%u' /app >/dev/null 2>&1; then
|
if stat -c '%u' /app >/dev/null 2>&1; then
|
||||||
@@ -65,8 +65,8 @@ chown -R "$repo_uid:$repo_gid" "$repo_home"
|
|||||||
if command -v setpriv >/dev/null 2>&1; then
|
if command -v setpriv >/dev/null 2>&1; then
|
||||||
exec setpriv --reuid="$repo_uid" --regid="$repo_gid" --clear-groups \
|
exec setpriv --reuid="$repo_uid" --regid="$repo_gid" --clear-groups \
|
||||||
env HOME="$repo_home" XDG_CONFIG_HOME="$repo_home/.config" \
|
env HOME="$repo_home" XDG_CONFIG_HOME="$repo_home/.config" \
|
||||||
pnpm --filter @capakraken/web exec next dev -H 0.0.0.0 -p 3100
|
pnpm --filter @nexus/web exec next dev -H 0.0.0.0 -p 3100
|
||||||
else
|
else
|
||||||
exec su -s /bin/sh "#${repo_uid}" -c \
|
exec su -s /bin/sh "#${repo_uid}" -c \
|
||||||
"HOME='$repo_home' XDG_CONFIG_HOME='$repo_home/.config' pnpm --filter @capakraken/web exec next dev -H 0.0.0.0 -p 3100"
|
"HOME='$repo_home' XDG_CONFIG_HOME='$repo_home/.config' pnpm --filter @nexus/web exec next dev -H 0.0.0.0 -p 3100"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user