Files
apix-mvp/scripts/stop.sh
T
Carsten Rehfeld b2a16a8be7 Implement apix-registry with IoT sunset/decommission lifecycle and full BDD suite
- REST API: register, patch, O-level, replacements, history, search endpoints
- IoT lifecycle validations: future sunset, lock-before-release, sunset-passed-before-decommission
- DB schema: Liquibase changesets 001–008 (services, versions, replacements, sunset-at column)
- @ColumnTransformer(write="?::jsonb") on bsm_payload fields to avoid JDBC varchar→jsonb rejection
- Jandex plugin on apix-common + quarkus.index-dependency so @NotBlank validators resolve at runtime
- quarkus-logging-json extension added; quarkus.log.console.json=false is now a recognised key
- Fix requireSunsetBeforeLockRelease: Boolean.TRUE.equals instead of !Boolean.FALSE.equals (null guard)
- BDD suite: 27 scenarios / 213 steps across 5 feature files (sunset-lock, decommission, replacement, discovery, anonymity)
- Test infrastructure: JDBC TRUNCATE in @Before for DB isolation, Arc.container() for clock control — no test endpoints in production code
- sunsetAt truncated to microseconds in BDD steps to match Postgres timestamptz precision
- Cucumber step fixes: singular/plural candidate(s), lastResponse propagation in replacementsReturnsNCandidates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 09:13:26 +02:00

39 lines
1.0 KiB
Bash

#!/usr/bin/env bash
# Stop all dev-mode Quarkus processes and the PostgreSQL container.
set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
PID_DIR="$PROJECT_ROOT/.pids"
GREEN='\033[0;32m'; NC='\033[0m'
info() { echo -e "${GREEN}[apix]${NC} $*"; }
# tmux session
if command -v tmux &>/dev/null && tmux has-session -t apix-dev 2>/dev/null; then
info "Killing tmux session apix-dev"
tmux kill-session -t apix-dev
fi
# PID files (background mode)
if [[ -d "$PID_DIR" ]]; then
for pidfile in "$PID_DIR"/*.pid; do
[[ -f "$pidfile" ]] || continue
pid=$(cat "$pidfile")
module=$(basename "$pidfile" .pid)
if kill -0 "$pid" 2>/dev/null; then
info "Stopping $module (PID $pid)"
kill "$pid" 2>/dev/null || true
fi
rm -f "$pidfile"
done
fi
# PostgreSQL container
if docker ps --format '{{.Names}}' | grep -qx apix-postgres; then
info "Stopping apix-postgres container"
docker stop apix-postgres >/dev/null
fi
info "All stopped"