Skip to content

Add composable way to extend our Complement Docker images with custom homeserver config #19295

@MadLittleMods

Description

@MadLittleMods

For Complement testing in other projects like the SBG (public docs) and the Rust apps used in Synapse Pro, we've been extending the complement-synapse Docker image and doing a series of dirty hacks to insert our own homeserver config. This issue is spawning from having to add the hacks to yet another project, https://github.com/element-hq/synapse-rust-apps/pull/364

For example to get in the middle of everything while still re-using the Synapse utilities, we have to do some hacky find/replace text manipulation of docker/complement/conf/start_for_complement.sh to prevent it from actually starting Synapse (remove exec /configure_workers_and_start.py) so we can re-use all of the good logic to around setting the correct environment variables like SYNAPSE_SERVER_NAME, SYNAPSE_WORKER_TYPES, etc and add in our own homeserver config. Then later, we call configure_workers_and_start.py ourselves.

We have also just been glomming onto the same supervisord and nginx patterns that Synapse uses to add in our own applications and network routing.

It would be nice if there was a more clear path instead of relying on these brittle hacks as it can be a bit confusing to follow and understand what's happening. So far in terms of things working, things have mostly been fine since we don't touch those scripts very often though.

Related to #9944 about making it easy to configure Synapse modules in our Docker images.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions