mirror of
https://github.com/ajnart/homarr.git
synced 2026-01-29 10:49:14 +01:00
fix(docker): replace anonymous docker volume with env variable for encrypting secrets (#1809)
This commit is contained in:
@@ -5,7 +5,22 @@ export const createHomarrContainer = () => {
|
||||
throw new Error("This test should only be run in CI or with a homarr image named 'homarr-e2e'");
|
||||
}
|
||||
|
||||
return new GenericContainer("homarr-e2e")
|
||||
.withExposedPorts(7575)
|
||||
.withWaitStrategy(Wait.forHttp("/api/health/ready", 7575));
|
||||
return withLogs(
|
||||
new GenericContainer("homarr-e2e")
|
||||
.withExposedPorts(7575)
|
||||
.withEnvironment({
|
||||
SECRET_ENCRYPTION_KEY: "0".repeat(64),
|
||||
})
|
||||
.withWaitStrategy(Wait.forHttp("/api/health/ready", 7575)),
|
||||
);
|
||||
};
|
||||
|
||||
export const withLogs = (container: GenericContainer) => {
|
||||
container.withLogConsumer((stream) =>
|
||||
stream
|
||||
.on("data", (line) => console.log(line))
|
||||
.on("err", (line) => console.error(line))
|
||||
.on("end", () => console.log("Stream closed")),
|
||||
);
|
||||
return container;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user