Files
buzz/deploy/compose/.env.example
Wes 5f08ed2511 fix(deploy): pin self-host installs to relay 0.3.0 (#9714)
## Summary

- Pin the Compose fallback and example environment to
`ghcr.io/block/buzz:0.3.0`. Document how to opt into rolling `:main`
builds and how to update the image tag before running `./run.sh
upgrade`.
- Set the Helm chart's default relay image to `0.3.0` through
`appVersion` and bump the chart and quickstart to `0.1.12`.
- Add a relay release checklist step to update both deployment defaults
after each stable image is available. The existing chart release
workflow publishes the bumped chart after merge.

### Related work

[#2824](https://github.com/block/buzz/pull/2824) also touches self-host
Compose. This PR covers release tags and upgrade instructions.

### Testing

- Rendered Compose with the example environment, the fallback, and
explicit image overrides. A fresh isolated Compose install reached
readiness with `ghcr.io/block/buzz:0.3.0` and returned `ok` from
`/_liveness`.
- Passed Helm lint and all 85 unit tests. Rendered all four chart
fixtures, verified the default image and an override, and packaged chart
`0.1.12` with app version `0.3.0`.
- The repository-wide `just ci` run passed. It started at `cf357b241`,
and the final commit changes only the Compose upgrade text.

---------

Signed-off-by: Star Lord <b89298dbe87c6b3fd8a425b535d9d161f23c88d555a47925ae0b04dfe02b201e@buzz.block.builderlab.xyz>
Co-authored-by: Star Lord <b89298dbe87c6b3fd8a425b535d9d161f23c88d555a47925ae0b04dfe02b201e@buzz.block.builderlab.xyz>
2026-11-19 10:09:04 -07:00

83 lines
3.9 KiB
Plaintext

# Buzz production Docker Compose environment.
# Copy to .env and replace every CHANGE_ME value before running.
# The bootstrap script should generate this file for normal users.
# Pin an exact relay release. Use ghcr.io/block/buzz:main to test rolling builds.
BUZZ_IMAGE=ghcr.io/block/buzz:0.3.0
# Public host name. Used by compose.caddy.yml and URL-derived settings below.
BUZZ_DOMAIN=buzz.example.com
RELAY_URL=wss://buzz.example.com
BUZZ_MEDIA_BASE_URL=https://buzz.example.com/media
BUZZ_MEDIA_SERVER_DOMAIN=buzz.example.com
BUZZ_CORS_ORIGINS=https://buzz.example.com
# Production defaults. Closed relay mode requires RELAY_OWNER_PUBKEY and a stable relay key.
BUZZ_REQUIRE_AUTH_TOKEN=true
BUZZ_REQUIRE_RELAY_MEMBERSHIP=true
BUZZ_ALLOW_NIP_OA_AUTH=true
BUZZ_AUTO_MIGRATE=true
BUZZ_GIT_CONFORMANCE_PROBE=true
# Push stays disabled unless explicitly enabled. Keep the delivery endpoint
# explicit so enabling it never depends on an in-code deployment fallback.
BUZZ_PUSH_ENABLED=false
BUZZ_PUSH_GATEWAY_DELIVERY_URL=https://push.buzz.xyz/v1/deliveries/apns
RUST_LOG=buzz_relay=info,buzz_db=info,buzz_auth=info,buzz_pubsub=info,tower_http=info
# Owner identity. Set to a 64-character hex Nostr pubkey.
RELAY_OWNER_PUBKEY=CHANGE_ME_OWNER_PUBKEY_HEX
# Stable secrets. Generate once, keep in .env, and back up securely.
BUZZ_RELAY_PRIVATE_KEY=CHANGE_ME_64_HEX_PRIVATE_KEY
BUZZ_GIT_HOOK_HMAC_SECRET=CHANGE_ME_RANDOM_64_HEX
POSTGRES_DB=buzz
POSTGRES_USER=buzz
POSTGRES_PASSWORD=CHANGE_ME_RANDOM_PASSWORD
REDIS_PASSWORD=CHANGE_ME_RANDOM_PASSWORD
BUZZ_S3_ACCESS_KEY=CHANGE_ME_RANDOM_ACCESS_KEY
BUZZ_S3_SECRET_KEY=CHANGE_ME_RANDOM_SECRET_KEY
BUZZ_S3_BUCKET=buzz-media
# Bundled MinIO uses path-style URLs; deploy/compose/compose.yml pins this.
BUZZ_S3_ADDRESSING_STYLE=path
# Optional private moderation dashboard. Set BUZZ_ADMIN_HOST plus BUZZ_ADMIN_AUTH:
# BUZZ_ADMIN_AUTH=nip98 (default) — NIP-98 HTTP Auth via Nostr pubkey-based auth.
# Authorized principals resolve from RELAY_OPERATOR_PUBKEYS (config Operators),
# RELAY_OWNER_PUBKEY (implicit Operator fallback when operator list is empty),
# and the relay_operators table (DB-managed Operator/Moderator roster).
# Dashboard requires a NIP-07 browser extension (nos2x or Alby).
# BUZZ_ADMIN_AUTH=disabled — read-only, no auth. Anyone who can reach the relay
# can read every community's reports, feedback and attachments, bans and
# timeouts, community directory, member profiles and any stored message by
# ID; writes and staffing are refused. Only people allowed to see all of that
# may reach it. The admin API is on the relay's main port and its hostname
# check uses the caller's Host header, so the published relay port itself must
# be private; a private admin hostname is not enough. Relay logs a WARN on boot.
# Token authentication was removed: BUZZ_ADMIN_TOKEN is ignored with a startup
# warning — remove it from the environment.
# Any unrecognised BUZZ_ADMIN_AUTH value aborts startup.
# When BUZZ_ADMIN_HOST is set, the relay advertises the admin origin in its NIP-11
# document (`admin_api` field) so clients auto-discover the console without manual entry.
# Setting RELAY_OPERATOR_PUBKEYS for the console does NOT require RELAY_OPERATOR_API_ORIGIN;
# that origin is only for community provisioning (POST /operator/communities), which fails
# closed at request time until it is set (the relay boots with a WARN in the meantime).
# BUZZ_ADMIN_HOST=admin.buzz.example.com
# BUZZ_ADMIN_AUTH=nip98
# RELAY_OPERATOR_PUBKEYS=<64-char hex pubkey>[,<64-char hex pubkey>...]
# RELAY_OPERATOR_API_ORIGIN=https://admin.buzz.example.com
# Optional host ports. Base compose publishes the relay directly on BUZZ_HTTP_PORT.
BUZZ_HTTP_PORT=3000
# Caddy host ports. Only used with compose.caddy.yml.
CADDY_HTTP_PORT=80
CADDY_HTTPS_PORT=443
# Dev override ports. Only used with compose.dev.yml.
POSTGRES_PORT=5432
REDIS_PORT=6379
MINIO_API_PORT=9000
MINIO_CONSOLE_PORT=9001
ADMINER_PORT=8082
PROMETHEUS_PORT=9090