Skip to content

Sync official Synapse worker system from beacon-node#3

Closed
GImbrailo wants to merge 3 commits intomainfrom
sync-worker-system-from-beacon-node
Closed

Sync official Synapse worker system from beacon-node#3
GImbrailo wants to merge 3 commits intomainfrom
sync-worker-system-from-beacon-node

Conversation

@GImbrailo
Copy link
Contributor

Summary

Brings beacon-synapse up to date with the worker system implementation from the deacon beacon-node/docker/ subtree (commit bb57549).

  • Adds the full nginx + redis + supervisord worker orchestration system
  • beacon_entrypoint.py wraps Element HQ's configure_workers_and_start.py for automatic worker setup
  • SYNAPSE_WORKERS=true enables 4 specialized workers: 2× synchrotron, 1× event_persister, 1× federation_inbound
  • Backward compatible — single-process mode works unchanged

New files

  • beacon_entrypoint.py — main entrypoint (wraps configure_workers_and_start.py)
  • configure_workers_and_start.py — official Synapse worker orchestration from Element HQ
  • conf-workers/ — Jinja2 templates for nginx, supervisord, worker configs
  • prefix-log — log prefix utility
  • matrix_synapse.target, synapse_master.service, synapse_worker@.service — systemd units
  • template_entrypoint.sh — template-based entrypoint
  • TEST.md — testing procedures
  • docker-compose.test.yml, prometheus.test.yml — test environment configs

Updated files

  • Dockerfile — adds nginx-light, redis-server, supervisor; switches entrypoint to beacon_entrypoint.py
  • homeserver.yaml — Jinja2 template syntax ({{VAR}}), updated for worker compatibility
  • synctl_entrypoint.sh, shared_config.yaml, synapse.log.config — updated
  • workers/*.yaml — updated worker configurations
  • crypto_auth_provider.py, beacon_monitor_module.py, beacon_info_module.py, README.md — updates from beacon-node

Test plan

  • Single-process mode: docker run without SYNAPSE_WORKERS=true boots cleanly
  • Worker mode: SYNAPSE_WORKERS=true starts nginx + 4 workers via supervisord
  • Ed25519 auth still works in both modes
  • Prometheus metrics accessible at :19090 (main) and :19091:19094 (workers)
  • .well-known/matrix/server routed correctly when SERVE_WELLKNOWN=true

🤖 Generated with Claude Code

GImbrailo and others added 3 commits February 25, 2026 16:07
Brings beacon-synapse up to date with the worker system implementation
from beacon-node/docker (deacon commit bb57549).

## New files
- beacon_entrypoint.py: Main entrypoint wrapping configure_workers_and_start.py
- configure_workers_and_start.py: Official Synapse worker orchestration (from Element HQ)
- conf-workers/: Jinja2 templates for nginx, supervisord, worker configs
- prefix-log: Log prefix utility for worker process logging
- matrix_synapse.target, synapse_master.service, synapse_worker@.service: systemd units
- template_entrypoint.sh: Template-based entrypoint
- TEST.md: Testing procedures
- docker-compose.test.yml, prometheus.test.yml: Test environment configs

## Updated files
- Dockerfile: Adds nginx, redis-server, supervisor; uses beacon_entrypoint.py
- homeserver.yaml: Jinja2 template syntax ({{VAR}}), updated defaults
- shared_config.yaml: Updated template syntax
- synapse.log.config: Updated logging config
- synctl_entrypoint.sh: Updated for worker compatibility
- wait-for.sh: Updated version
- workers/*.yaml: Updated worker configs
- crypto_auth_provider.py, beacon_*_module.py, README.md: Updates from beacon-node

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The old example showed a minimal single-process setup. The new example
demonstrates both single-process and multi-worker modes using profiles,
matching the full capability of the image.

Changes:
- docker-compose.example.yml: Replaced with multi-profile version covering
  single-process (--profile single), worker mode (--profile workers), and
  optional monitoring stack (--profile monitoring)
- docker-compose.test.yml: Removed (content merged into example.yml)

Image references updated to ghcr.io/ecadinfra/beacon-synapse:latest.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously the workflow only pushed on semver tags, so PRs triggered a
build but nothing was published. Now:

  PR      → ghcr.io/.../beacon-synapse:pr-N
  main    → ghcr.io/.../beacon-synapse:main
  v*      → ghcr.io/.../beacon-synapse:vX.Y.Z + :latest

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jevonearth
Copy link
Contributor

replaced be #4

@jevonearth jevonearth closed this Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants