mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Search is Postgres FTS; the relay no longer reads TYPESENSE_URL/_API_KEY, so
the local stacks no longer provision or wait on a Typesense container:
- docker-compose.yml: removed the typesense service + typesense-data volume.
- deploy/compose/compose.yml: removed the typesense service, its volume, the
relay's TYPESENSE_URL env, and the relay depends_on: typesense health gate;
compose.dev.yml: removed the typesense port/CORS override.
- scripts/start-relay-for-tests.sh: stopped bringing up + health-waiting on
the typesense container and stopped exporting TYPESENSE_* to the relay.
- scripts/{dev-setup,run-tests}.sh: removed TYPESENSE_* env export/printout.
- scripts/dev-reset.sh, e2e-*.sh, compose READMEs/run.sh: doc-string cleanup.
Verified: docker compose config renders cleanly for docker-compose.yml and for
deploy/compose (compose.yml + compose.dev.yml), zero typesense in the rendered
output; all touched shell scripts pass bash -n.
Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
55 lines
1.7 KiB
Bash
Executable File
55 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# =============================================================================
|
|
# dev-reset.sh — Tear down everything and recreate a clean environment
|
|
# =============================================================================
|
|
# Usage: ./scripts/dev-reset.sh
|
|
#
|
|
# Stops all services, removes ALL volumes (data is lost!), brings everything
|
|
# back up fresh, and runs migrations.
|
|
# =============================================================================
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
|
|
# Colors
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m'
|
|
|
|
log() { echo -e "${BLUE}[dev-reset]${NC} $*"; }
|
|
success(){ echo -e "${GREEN}[dev-reset]${NC} $*"; }
|
|
warn() { echo -e "${YELLOW}[dev-reset]${NC} $*"; }
|
|
error() { echo -e "${RED}[dev-reset]${NC} $*" >&2; }
|
|
|
|
cd "${REPO_ROOT}"
|
|
|
|
# ---- Confirm ----------------------------------------------------------------
|
|
|
|
if [[ "${1:-}" != "--yes" ]]; then
|
|
echo -e "${YELLOW}WARNING: This will DELETE all local data (postgres, minio volumes).${NC}"
|
|
echo -e " Redis data is ephemeral and always wiped on restart."
|
|
echo ""
|
|
read -r -p "Are you sure? [y/N] " confirm
|
|
case "${confirm}" in
|
|
[yY][eE][sS]|[yY]) ;;
|
|
*)
|
|
log "Aborted."
|
|
exit 0
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
# ---- Tear down --------------------------------------------------------------
|
|
|
|
log "Stopping and removing containers + volumes..."
|
|
docker compose down -v --remove-orphans 2>/dev/null || true
|
|
success "Containers and volumes removed"
|
|
|
|
# ---- Bring back up ----------------------------------------------------------
|
|
|
|
log "Recreating environment..."
|
|
exec "${SCRIPT_DIR}/dev-setup.sh"
|