mirror of
https://github.com/block/buzz.git
synced 2026-10-29 05:21:31 +00:00
chore(compose,scripts): drop Typesense from local dev/test stacks
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>
This commit is contained in:
parent
90ebf1ffee
commit
f8bbe6efc3
@@ -29,7 +29,7 @@ cd "${REPO_ROOT}"
|
||||
# ---- Confirm ----------------------------------------------------------------
|
||||
|
||||
if [[ "${1:-}" != "--yes" ]]; then
|
||||
echo -e "${YELLOW}WARNING: This will DELETE all local data (postgres, typesense volumes).${NC}"
|
||||
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
|
||||
|
||||
@@ -59,7 +59,6 @@ load_env() {
|
||||
if [[ "${PGUSER:-}" == "sprout" ]]; then PGUSER="buzz"; fi
|
||||
if [[ "${PGPASSWORD:-}" == "sprout_dev" ]]; then PGPASSWORD="buzz_dev"; fi
|
||||
if [[ "${PGDATABASE:-}" == "sprout" ]]; then PGDATABASE="buzz"; fi
|
||||
if [[ "${TYPESENSE_API_KEY:-}" == "sprout_dev_key" ]]; then TYPESENSE_API_KEY="buzz_dev_key"; fi
|
||||
|
||||
export DATABASE_URL="${DATABASE_URL:-postgres://buzz:buzz_dev@localhost:5432/buzz}"
|
||||
export PGHOST="${PGHOST:-localhost}"
|
||||
@@ -68,13 +67,11 @@ load_env() {
|
||||
export PGPASSWORD="${PGPASSWORD:-buzz_dev}"
|
||||
export PGDATABASE="${PGDATABASE:-buzz}"
|
||||
export REDIS_URL="${REDIS_URL:-redis://localhost:6379}"
|
||||
export TYPESENSE_API_KEY="${TYPESENSE_API_KEY:-buzz_dev_key}"
|
||||
export TYPESENSE_URL="${TYPESENSE_URL:-http://localhost:8108}"
|
||||
}
|
||||
|
||||
cleanup_legacy_sprout_containers() {
|
||||
local legacy_containers
|
||||
legacy_containers=$(docker ps -a --format '{{.Names}}' | grep -E '^sprout-(postgres|redis|typesense|adminer|keycloak|minio|minio-init|prometheus)$' || true)
|
||||
legacy_containers=$(docker ps -a --format '{{.Names}}' | grep -E '^sprout-(postgres|redis|adminer|keycloak|minio|minio-init|prometheus)$' || true)
|
||||
if [[ -z "${legacy_containers}" ]]; then
|
||||
return
|
||||
fi
|
||||
@@ -184,7 +181,6 @@ echo -e "${GREEN}=======================================================${NC}"
|
||||
echo ""
|
||||
echo -e " ${BLUE}Postgres${NC} ${DATABASE_URL}"
|
||||
echo -e " ${BLUE}Redis${NC} ${REDIS_URL}"
|
||||
echo -e " ${BLUE}Typesense${NC} ${TYPESENSE_URL} (key: ${TYPESENSE_API_KEY})"
|
||||
echo -e " ${BLUE}Adminer${NC} http://localhost:8082 (DB browser)"
|
||||
echo -e " ${BLUE}Keycloak${NC} http://localhost:8180 (admin / admin — local OAuth testing)"
|
||||
echo ""
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# Two bots collaborate on a simple web page via the Buzz relay's git server.
|
||||
#
|
||||
# Prerequisites:
|
||||
# - Docker services running (postgres, redis, typesense)
|
||||
# - Docker services running (postgres, redis, minio)
|
||||
# - Relay built: cargo build --release --bin buzz-relay
|
||||
# - Credential helper built: cargo build --release --bin git-credential-nostr
|
||||
# - Signing program built: cargo build --release --bin git-sign-nostr
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# Tests relay-level membership enforcement and admin commands.
|
||||
#
|
||||
# Prerequisites:
|
||||
# - Docker services running (postgres, redis, typesense)
|
||||
# - Docker services running (postgres, redis, minio)
|
||||
# - Relay built: cargo build --release --bin buzz-relay
|
||||
# - nak available on PATH (for event signing)
|
||||
#
|
||||
|
||||
@@ -47,8 +47,6 @@ else
|
||||
export PGPASSWORD=buzz_dev
|
||||
export PGDATABASE=buzz
|
||||
export REDIS_URL="redis://localhost:6379"
|
||||
export TYPESENSE_API_KEY="buzz_dev_key"
|
||||
export TYPESENSE_URL="http://localhost:8108"
|
||||
fi
|
||||
|
||||
# ---- Track results ----------------------------------------------------------
|
||||
|
||||
@@ -55,7 +55,7 @@ err() { echo -e "${RED}[relay-test]${NC} $*" >&2; }
|
||||
cd "${REPO_ROOT}"
|
||||
|
||||
log "Starting docker compose services..."
|
||||
docker compose up -d postgres redis typesense minio minio-init
|
||||
docker compose up -d postgres redis minio minio-init
|
||||
|
||||
# ── Wait for services to be healthy ──────────────────────────────────────────
|
||||
|
||||
@@ -78,7 +78,6 @@ wait_healthy() {
|
||||
|
||||
wait_healthy "Postgres" "buzz-postgres"
|
||||
wait_healthy "Redis" "buzz-redis"
|
||||
wait_healthy "Typesense" "buzz-typesense"
|
||||
wait_healthy "MinIO" "buzz-minio"
|
||||
|
||||
# ── Apply database schema ────────────────────────────────────────────────────
|
||||
@@ -129,8 +128,6 @@ log "Starting relay..."
|
||||
nohup env \
|
||||
DATABASE_URL=postgres://buzz:buzz_dev@localhost:5432/buzz \
|
||||
REDIS_URL=redis://localhost:6379 \
|
||||
TYPESENSE_URL=http://localhost:8108 \
|
||||
TYPESENSE_API_KEY=buzz_dev_key \
|
||||
RELAY_URL=ws://localhost:3000 \
|
||||
BUZZ_BIND_ADDR=0.0.0.0:3000 \
|
||||
BUZZ_REQUIRE_AUTH_TOKEN=false \
|
||||
|
||||
Reference in New Issue
Block a user