Skip to content

Commit

Permalink
Include keycloak service (aklivity#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfallows authored Jul 18, 2024
1 parent 8e345f4 commit f04d0bd
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ protected void invoke(
factories.add(new CreateKafkaFactory());
factories.add(new CreateRisingWaveFactory());
factories.add(new CreateApicurioFactory());
factories.add(new CreateKeycloakFactory());

for (CreateContainerFactory factory : factories)
{
Expand Down Expand Up @@ -342,4 +343,29 @@ CreateContainerCmd createContainer(
.withCmd("playground");
}
}

private static final class CreateKeycloakFactory extends CreateContainerFactory
{
CreateKeycloakFactory()
{
super("keycloak", "bitnami/keycloak:latest");
}

@Override
CreateContainerCmd createContainer(
DockerClient client)
{
return client
.createContainerCmd(image)
.withLabels(project)
.withName(name)
.withHostName(hostname)
.withHostConfig(HostConfig.newHostConfig()
.withNetworkMode(network)
.withRestartPolicy(unlessStoppedRestart()))
.withTty(true)
.withEnv(
"KEYCLOAK_DATABASE_VENDOR=dev-file");
}
}
}

0 comments on commit f04d0bd

Please sign in to comment.