feat(services): add Buzz one-click service template (#11020)

This commit is contained in:
Andras Bacsai
2026-07-23 17:25:53 +02:00
committed by GitHub
parent e560bdf9e0
commit f06bacc8e0
5 changed files with 229 additions and 8 deletions
+20
View File
@@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 466 309">
<style>
.mark { fill: #231e1e; }
@media (prefers-color-scheme: dark) {
.mark { fill: #d7d72e; }
}
</style>
<defs>
<mask id="bee-mask">
<circle cx="91.7" cy="154.5" r="91.7" fill="white"/>
<circle cx="374.3" cy="154.5" r="91.7" fill="white"/>
<rect x="128" y="0" width="210" height="309" rx="34" fill="white"/>
<circle cx="193.3" cy="84.4" r="27" fill="black"/>
<circle cx="276" cy="84.4" r="27" fill="black"/>
<rect x="166.3" y="157.2" width="136.9" height="38.3" rx="5" fill="black"/>
<rect x="166.9" y="235.1" width="136.2" height="37.6" rx="5" fill="black"/>
</mask>
</defs>
<rect class="mark" width="466" height="309" mask="url(#bee-mask)"/>
</svg>

After

Width:  |  Height:  |  Size: 794 B

+126
View File
@@ -0,0 +1,126 @@
# documentation: https://github.com/block/buzz
# slogan: Self-hostable workspace where humans and AI agents collaborate on a Nostr relay you own.
# category: messaging
# tags: buzz,chat,nostr,agents,ai,collaboration,relay,block
# logo: svgs/buzz.svg
# port: 3000
services:
buzz:
image: 'ghcr.io/block/buzz:${BUZZ_TAG:-main}'
environment:
- SERVICE_URL_BUZZ_3000
- BUZZ_BIND_ADDR=0.0.0.0:3000
- BUZZ_HEALTH_PORT=8080
- BUZZ_METRICS_PORT=9102
- RELAY_URL=wss://${SERVICE_FQDN_BUZZ}
- BUZZ_MEDIA_BASE_URL=${SERVICE_URL_BUZZ}/media
- BUZZ_MEDIA_SERVER_DOMAIN=${SERVICE_FQDN_BUZZ}
- BUZZ_CORS_ORIGINS=${SERVICE_URL_BUZZ}
- DATABASE_URL=postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-buzz}
- REDIS_URL=redis://:${SERVICE_PASSWORD_REDIS}@redis:6379
- BUZZ_S3_ENDPOINT=http://minio:9000
- BUZZ_S3_ACCESS_KEY=${SERVICE_USER_MINIO}
- BUZZ_S3_SECRET_KEY=${SERVICE_PASSWORD_MINIO}
- BUZZ_S3_BUCKET=${BUZZ_S3_BUCKET:-buzz-media}
- BUZZ_GIT_REPO_PATH=/data/git
- BUZZ_RELAY_PRIVATE_KEY=${SERVICE_HEX_64_RELAYKEY}
- BUZZ_GIT_HOOK_HMAC_SECRET=${SERVICE_HEX_64_GITHMAC}
- BUZZ_AUTO_MIGRATE=${BUZZ_AUTO_MIGRATE:-true}
- BUZZ_GIT_CONFORMANCE_PROBE=${BUZZ_GIT_CONFORMANCE_PROBE:-true}
- BUZZ_REQUIRE_AUTH_TOKEN=${BUZZ_REQUIRE_AUTH_TOKEN:-true}
- BUZZ_REQUIRE_RELAY_MEMBERSHIP=${BUZZ_REQUIRE_RELAY_MEMBERSHIP:-false}
- BUZZ_ALLOW_NIP_OA_AUTH=${BUZZ_ALLOW_NIP_OA_AUTH:-true}
- RELAY_OWNER_PUBKEY=${RELAY_OWNER_PUBKEY}
- RUST_LOG=${RUST_LOG:-buzz_relay=info,buzz_db=info,buzz_auth=info,buzz_pubsub=info,tower_http=info}
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
healthcheck:
test:
- CMD-SHELL
- "curl -fsS http://127.0.0.1:8080/_readiness >/dev/null || exit 1"
interval: 10s
timeout: 5s
retries: 12
start_period: 45s
postgres:
image: 'postgres:17-alpine'
environment:
- POSTGRES_USER=${SERVICE_USER_POSTGRES}
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
- POSTGRES_DB=${POSTGRES_DB:-buzz}
- 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
redis:
image: 'redis:7-alpine'
command: ['redis-server', '--appendonly', 'yes', '--requirepass', '${SERVICE_PASSWORD_REDIS}']
environment:
- REDIS_PASSWORD=${SERVICE_PASSWORD_REDIS}
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
minio:
image: 'minio/minio:RELEASE.2025-09-07T16-13-09Z'
command: 'server /data --console-address ":9001"'
environment:
- MINIO_ROOT_USER=${SERVICE_USER_MINIO}
- MINIO_ROOT_PASSWORD=${SERVICE_PASSWORD_MINIO}
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
minio-init:
image: 'minio/mc:RELEASE.2025-08-13T08-35-41Z'
depends_on:
minio:
condition: service_healthy
environment:
- BUZZ_S3_ACCESS_KEY=${SERVICE_USER_MINIO}
- BUZZ_S3_SECRET_KEY=${SERVICE_PASSWORD_MINIO}
- 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'
exclude_from_hc: true
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+35
View File
@@ -0,0 +1,35 @@
<?php
it('includes a production-ready Buzz one-click service template', function () {
$compose = file_get_contents(__DIR__.'/../../templates/compose/buzz.yaml');
expect($compose)
->toContain('ghcr.io/block/buzz:${BUZZ_TAG:-main}')
->toContain('SERVICE_URL_BUZZ_3000')
->toContain('RELAY_URL=wss://${SERVICE_FQDN_BUZZ}')
->toContain('BUZZ_RELAY_PRIVATE_KEY=${SERVICE_HEX_64_RELAYKEY}')
->toContain('BUZZ_AUTO_MIGRATE=${BUZZ_AUTO_MIGRATE:-true}')
->toContain('minio-init')
->toContain('exclude_from_hc: true')
->toContain('postgres:17-alpine')
->toContain('redis:7-alpine');
foreach (['service-templates.json', 'service-templates-latest.json'] as $templateFile) {
$templates = json_decode(
file_get_contents(__DIR__."/../../templates/{$templateFile}"),
associative: true,
flags: JSON_THROW_ON_ERROR,
);
expect($templates)->toHaveKey('buzz');
expect($templates['buzz']['port'] ?? null)->toBe('3000');
expect($templates['buzz']['logo'] ?? null)->toBe('svgs/buzz.svg');
expect($templates['buzz']['category'] ?? null)->toBe('messaging');
$generatedCompose = base64_decode($templates['buzz']['compose'], strict: true);
expect($generatedCompose)
->toContain('ghcr.io/block/buzz:${BUZZ_TAG:-main}')
->toContain('wss://');
}
});