- Extend docker-compose.dev.yml with optional monitoring profile (Prometheus, Grafana, Loki) via --profile monitoring - Align dev PostgreSQL with production: pg_stat_statements + init scripts - Add scripts/seed.ts with idempotent Berlin test data (user, route, activity) - Add pnpm db:seed and pnpm dev:reset scripts - Simplify CI e2e job: replace manual docker run + BRouter setup with docker compose up --wait; add db:seed step - Improve scripts/dev.sh: Docker check, --wait health checks, --monitoring flag, seed step - Add scripts/reset-dev.sh to wipe and restart the local stack - Add .env.development.example with documented local defaults Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
715 B
Bash
Executable file
26 lines
715 B
Bash
Executable file
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
PROJECT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
cd "$PROJECT_DIR"
|
|
|
|
if ! docker info > /dev/null 2>&1; then
|
|
echo "Error: Docker is not running. Please start Docker and try again."
|
|
exit 1
|
|
fi
|
|
|
|
echo "=== Resetting dev environment ==="
|
|
echo "This will stop all containers and wipe all local data volumes."
|
|
echo ""
|
|
|
|
read -r -p "Are you sure? [y/N] " confirm
|
|
if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then
|
|
echo "Aborted."
|
|
exit 0
|
|
fi
|
|
|
|
echo "Stopping containers and removing volumes..."
|
|
docker compose -f docker-compose.dev.yml --profile monitoring down -v 2>/dev/null || \
|
|
docker compose -f docker-compose.dev.yml down -v
|
|
|
|
echo "✓ Done. Run 'pnpm dev:full' to start fresh."
|