parent
a4ba79ae69
commit
94697fe755
|
@ -211,30 +211,19 @@ export class DendriteContainer extends GenericContainer {
|
||||||
constructor(
|
constructor(
|
||||||
private request: APIRequestContext,
|
private request: APIRequestContext,
|
||||||
image = "matrixdotorg/dendrite-monolith:main",
|
image = "matrixdotorg/dendrite-monolith:main",
|
||||||
entrypoint = "/usr/bin/dendrite",
|
binary = "/usr/bin/dendrite",
|
||||||
) {
|
) {
|
||||||
super(image);
|
super(image);
|
||||||
|
|
||||||
this.config = deepCopy(DEFAULT_CONFIG);
|
this.config = deepCopy(DEFAULT_CONFIG);
|
||||||
this.config.client_api.registration_shared_secret = randB64Bytes(16);
|
this.config.client_api.registration_shared_secret = randB64Bytes(16);
|
||||||
|
|
||||||
this.withEntrypoint([entrypoint])
|
this.withEntrypoint(["/bin/sh"])
|
||||||
.withCommand([
|
.withCommand([
|
||||||
"--config",
|
"-c",
|
||||||
"/etc/dendrite/dendrite.yaml",
|
`/usr/bin/generate-keys -private-key /etc/dendrite/matrix_key.pem && ${binary} --config /etc/dendrite/dendrite.yaml --really-enable-open-registration true run`,
|
||||||
"--really-enable-open-registration",
|
|
||||||
"true",
|
|
||||||
"run",
|
|
||||||
])
|
])
|
||||||
.withWaitStrategy(Wait.forHttp("/_matrix/client/versions", 8008));
|
.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 {
|
public withConfigField(key: string, value: any): this {
|
||||||
|
|
|
@ -144,6 +144,8 @@ export class SynapseContainer extends GenericContainer {
|
||||||
|
|
||||||
const signingKey = randB64Bytes(32);
|
const signingKey = randB64Bytes(32);
|
||||||
this.withWaitStrategy(Wait.forHttp("/health", 8008)).withCopyContentToContainer([
|
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/localhost.signing.key", content: `ed25519 x ${signingKey}` },
|
||||||
{
|
{
|
||||||
target: "/data/log.config",
|
target: "/data/log.config",
|
||||||
|
|
Loading…
Reference in New Issue