Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/28860/head
Michael Telatynski 2025-01-06 09:34:31 +00:00
parent a4ba79ae69
commit 94697fe755
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D
2 changed files with 6 additions and 15 deletions

View File

@ -211,30 +211,19 @@ export class DendriteContainer extends GenericContainer {
constructor(
private request: APIRequestContext,
image = "matrixdotorg/dendrite-monolith:main",
entrypoint = "/usr/bin/dendrite",
binary = "/usr/bin/dendrite",
) {
super(image);
this.config = deepCopy(DEFAULT_CONFIG);
this.config.client_api.registration_shared_secret = randB64Bytes(16);
this.withEntrypoint([entrypoint])
this.withEntrypoint(["/bin/sh"])
.withCommand([
"--config",
"/etc/dendrite/dendrite.yaml",
"--really-enable-open-registration",
"true",
"run",
"-c",
`/usr/bin/generate-keys -private-key /etc/dendrite/matrix_key.pem && ${binary} --config /etc/dendrite/dendrite.yaml --really-enable-open-registration true run`,
])
.withWaitStrategy(Wait.forHttp("/_matrix/client/versions", 8008));
// const docker = new Docker();
// await docker.run({
// image: dendriteImage,
// params: ["--entrypoint=", "-v", `${tempDir}:/mnt`],
// containerName: `react-sdk-playwright-dendrite-keygen`,
// cmd: ["/usr/bin/generate-keys", "-private-key", "/mnt/matrix_key.pem"],
// });
}
public withConfigField(key: string, value: any): this {

View File

@ -144,6 +144,8 @@ export class SynapseContainer extends GenericContainer {
const signingKey = randB64Bytes(32);
this.withWaitStrategy(Wait.forHttp("/health", 8008)).withCopyContentToContainer([
// Create an empty file with permissive permissions to allow the container to write to it
{ target: "/data/media_store/.gitkeep", content: "", mode: 0o777 },
{ target: "/data/localhost.signing.key", content: `ed25519 x ${signingKey}` },
{
target: "/data/log.config",