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:
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d
2026-06-27 14:42:30 -04:00
co-authored by Tyler Longwell
parent 90ebf1ffee
commit f8bbe6efc3
11 changed files with 8 additions and 83 deletions
+2 -2
View File
@@ -29,14 +29,14 @@ keypair.
`!reset` tag to remove the direct relay port when Caddy terminates HTTPS.
- Default `BUZZ_IMAGE` tracks `ghcr.io/block/buzz:main` for early testing. Pin it to `ghcr.io/block/buzz:sha-<7>` or a semver release tag for production once available.
- Keep `BUZZ_RELAY_PRIVATE_KEY`, `BUZZ_GIT_HOOK_HMAC_SECRET`, database/Redis,
Typesense, and S3 secrets stable across restarts.
and S3 secrets stable across restarts.
- `RELAY_OWNER_PUBKEY` is intentionally not prefixed with `BUZZ_`; it must be a
64-character hex Nostr pubkey when closed relay mode is enabled.
- `BUZZ_AUTO_MIGRATE` is opt-in. Set `BUZZ_AUTO_MIGRATE=true` or run
`buzz-admin migrate` before starting the relay when bootstrapping a fresh
database. Auto-migration requires an image that includes embedded SQLx
migrations.
- The stack uses Postgres, Redis, Typesense, MinIO, and a git data volume because
- The stack uses Postgres, Redis, MinIO, and a git data volume because
those are real Buzz dependencies today. Minimal mode can simplify this later.
Run `./run.sh backup-hint` for the backup checklist.
-6
View File
@@ -7,12 +7,6 @@ services:
ports:
- "${REDIS_PORT:-6379}:6379"
typesense:
environment:
TYPESENSE_ENABLE_CORS: "true"
ports:
- "${TYPESENSE_PORT:-8108}:8108"
minio:
ports:
- "${MINIO_API_PORT:-9000}:9000"
-28
View File
@@ -11,7 +11,6 @@ services:
BUZZ_METRICS_PORT: "9102"
DATABASE_URL: postgres://${POSTGRES_USER:-buzz}:${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-buzz}
REDIS_URL: redis://:${REDIS_PASSWORD:?set REDIS_PASSWORD}@redis:6379
TYPESENSE_URL: http://typesense:8108
BUZZ_S3_ENDPOINT: http://minio:9000
BUZZ_S3_ACCESS_KEY: ${BUZZ_S3_ACCESS_KEY:?set BUZZ_S3_ACCESS_KEY}
BUZZ_S3_SECRET_KEY: ${BUZZ_S3_SECRET_KEY:?set BUZZ_S3_SECRET_KEY}
@@ -28,8 +27,6 @@ services:
condition: service_healthy
redis:
condition: service_healthy
typesense:
condition: service_healthy
minio:
condition: service_healthy
minio-init:
@@ -85,28 +82,6 @@ services:
networks:
- buzz-net
typesense:
image: typesense/typesense:30.2
environment:
TYPESENSE_DATA_DIR: /data
TYPESENSE_API_KEY: ${TYPESENSE_API_KEY:?set TYPESENSE_API_KEY}
TYPESENSE_ENABLE_CORS: "false"
volumes:
- buzz-typesense-data:/data
healthcheck:
test:
[
"CMD-SHELL",
"bash -c 'exec 3<>/dev/tcp/127.0.0.1/8108; printf \"GET /health HTTP/1.1\\r\\nHost: 127.0.0.1\\r\\nConnection: close\\r\\n\\r\\n\" >&3; cat <&3 | grep -q ok'",
]
interval: 10s
timeout: 5s
retries: 12
start_period: 15s
restart: unless-stopped
networks:
- buzz-net
minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
command: server /data --console-address ":9001"
@@ -151,9 +126,6 @@ volumes:
buzz-redis-data:
labels:
com.buzz.volume: redis
buzz-typesense-data:
labels:
com.buzz.volume: typesense
buzz-minio-data:
labels:
com.buzz.volume: minio
+1 -1
View File
@@ -39,7 +39,7 @@ backup_hint() {
cat <<'MSG'
Back up these before upgrades and on a regular schedule:
- deploy/compose/.env, especially BUZZ_RELAY_PRIVATE_KEY, DB/Redis/Typesense/S3 secrets, and BUZZ_GIT_HOOK_HMAC_SECRET
- deploy/compose/.env, especially BUZZ_RELAY_PRIVATE_KEY, DB/Redis/S3 secrets, and BUZZ_GIT_HOOK_HMAC_SECRET
- The owner private key if bootstrap generated one for RELAY_OWNER_PUBKEY
- Postgres data (prefer pg_dump or a quiesced volume snapshot)
- MinIO/S3 bucket contents for media and git objects
-32
View File
@@ -52,34 +52,6 @@ services:
com.buzz.env: "dev"
restart: unless-stopped
typesense:
image: typesense/typesense:30.2
container_name: buzz-typesense
environment:
TYPESENSE_DATA_DIR: /data
TYPESENSE_API_KEY: buzz_dev_key
TYPESENSE_ENABLE_CORS: "true"
ports:
- "8108:8108"
volumes:
- typesense-data:/data
networks:
- buzz-net
healthcheck:
test: ["CMD-SHELL", "ls /proc/1/exe > /dev/null 2>&1 && kill -0 1 2>/dev/null || exit 1"]
interval: 10s
timeout: 5s
retries: 12
start_period: 15s
deploy:
resources:
limits:
memory: 256m
labels:
com.buzz.service: "typesense"
com.buzz.env: "dev"
restart: unless-stopped
adminer:
image: adminer:latest
container_name: buzz-adminer
@@ -202,10 +174,6 @@ volumes:
name: buzz-postgres-data
labels:
com.buzz.volume: "postgres"
typesense-data:
name: buzz-typesense-data
labels:
com.buzz.volume: "typesense"
minio-data:
name: buzz-minio-data
labels:
+1 -1
View File
@@ -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
+1 -5
View File
@@ -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 ""
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
#
-2
View File
@@ -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 ----------------------------------------------------------
+1 -4
View File
@@ -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 \