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>
141 lines
4.1 KiB
YAML
141 lines
4.1 KiB
YAML
name: buzz-prod
|
|
|
|
services:
|
|
relay:
|
|
image: ${BUZZ_IMAGE:-ghcr.io/block/buzz:main}
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
BUZZ_BIND_ADDR: 0.0.0.0:3000
|
|
BUZZ_HEALTH_PORT: "8080"
|
|
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
|
|
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}
|
|
BUZZ_S3_BUCKET: ${BUZZ_S3_BUCKET:-buzz-media}
|
|
BUZZ_GIT_REPO_PATH: /data/git
|
|
BUZZ_AUTO_MIGRATE: ${BUZZ_AUTO_MIGRATE:-false}
|
|
BUZZ_GIT_CONFORMANCE_PROBE: ${BUZZ_GIT_CONFORMANCE_PROBE:-true}
|
|
ports:
|
|
- "${BUZZ_HTTP_PORT:-3000}:3000"
|
|
volumes:
|
|
- buzz-git-data:/data/git
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
minio-init:
|
|
condition: service_completed_successfully
|
|
# Probe /_readiness over /dev/tcp because the runtime image has bash but no curl/wget/socat.
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"bash -ec 'exec 3<>/dev/tcp/127.0.0.1/8080; printf \"GET /_readiness HTTP/1.1\\r\\nHost: 127.0.0.1\\r\\nConnection: close\\r\\n\\r\\n\" >&3; grep -q \"200 OK\" <&3'",
|
|
]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 12
|
|
start_period: 30s
|
|
restart: unless-stopped
|
|
networks:
|
|
- buzz-net
|
|
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-buzz}
|
|
POSTGRES_USER: ${POSTGRES_USER:-buzz}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD}
|
|
PGDATA: /var/lib/postgresql/data/pgdata
|
|
volumes:
|
|
- buzz-postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 12
|
|
start_period: 10s
|
|
restart: unless-stopped
|
|
networks:
|
|
- buzz-net
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
command: ["redis-server", "--appendonly", "yes", "--requirepass", "${REDIS_PASSWORD:?set REDIS_PASSWORD}"]
|
|
environment:
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD:?set REDIS_PASSWORD}
|
|
volumes:
|
|
- buzz-redis-data:/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "redis-cli -a \"$${REDIS_PASSWORD}\" ping | grep -q PONG"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 12
|
|
start_period: 5s
|
|
restart: unless-stopped
|
|
networks:
|
|
- buzz-net
|
|
|
|
minio:
|
|
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
MINIO_ROOT_USER: ${BUZZ_S3_ACCESS_KEY:?set BUZZ_S3_ACCESS_KEY}
|
|
MINIO_ROOT_PASSWORD: ${BUZZ_S3_SECRET_KEY:?set BUZZ_S3_SECRET_KEY}
|
|
volumes:
|
|
- buzz-minio-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://127.0.0.1:9000/minio/health/live"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 12
|
|
start_period: 10s
|
|
restart: unless-stopped
|
|
networks:
|
|
- buzz-net
|
|
|
|
minio-init:
|
|
image: minio/mc:RELEASE.2025-08-13T08-35-41Z
|
|
depends_on:
|
|
minio:
|
|
condition: service_healthy
|
|
environment:
|
|
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}
|
|
BUZZ_S3_BUCKET: ${BUZZ_S3_BUCKET:-buzz-media}
|
|
entrypoint: >
|
|
/bin/sh -euc '
|
|
mc alias set local http://minio:9000 "$${BUZZ_S3_ACCESS_KEY}" "$${BUZZ_S3_SECRET_KEY}"
|
|
mc mb --ignore-existing "local/$${BUZZ_S3_BUCKET}"
|
|
mc anonymous set none "local/$${BUZZ_S3_BUCKET}"
|
|
'
|
|
restart: "no"
|
|
networks:
|
|
- buzz-net
|
|
|
|
volumes:
|
|
buzz-postgres-data:
|
|
labels:
|
|
com.buzz.volume: postgres
|
|
buzz-redis-data:
|
|
labels:
|
|
com.buzz.volume: redis
|
|
buzz-minio-data:
|
|
labels:
|
|
com.buzz.volume: minio
|
|
buzz-git-data:
|
|
labels:
|
|
com.buzz.volume: git
|
|
|
|
networks:
|
|
buzz-net:
|
|
driver: bridge
|
|
labels:
|
|
com.buzz.network: production
|