Class ComposeProject
java.lang.Object
io.quarkus.devservices.deployment.compose.ComposeProject
A wrapper around compose that starts and stops services defined a set of compose files.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionComposeProject(com.github.dockerjava.api.DockerClient dockerClient, ComposeFiles composeFiles, String executable, String project, Duration startupTimeout, Duration stopTimeout, boolean stopContainers, boolean ryukEnabled, boolean followContainerLogs, boolean removeVolumes, String removeImages, Boolean build, List<String> options, List<String> profiles, Map<String, Integer> scalingPreferences, Map<String, String> env) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWaitStrategy(Map<String, org.testcontainers.containers.wait.strategy.WaitAllStrategy> strategies, String instanceName, org.testcontainers.containers.wait.strategy.WaitStrategy strategy) can have multiple wait strategies for a single container, e.g. if waiting on several ports if no wait strategy is defined, the WaitAllStrategy will return immediately.voiddiscoverServiceInstances(boolean checkForRequiredServices) List<com.github.dockerjava.api.model.Network> voidrunWithCompose(String cmd, Map<String, String> env) voidstart()voidvoidstop()Stops the services defined in the docker-compose file.voidwaitUntilServicesReady(Executor waitOn)
-
Field Details
-
DEFAULT_NETWORK_NAME
- See Also:
-
-
Constructor Details
-
ComposeProject
public ComposeProject(com.github.dockerjava.api.DockerClient dockerClient, ComposeFiles composeFiles, String executable, String project, Duration startupTimeout, Duration stopTimeout, boolean stopContainers, boolean ryukEnabled, boolean followContainerLogs, boolean removeVolumes, String removeImages, Boolean build, List<String> options, List<String> profiles, Map<String, Integer> scalingPreferences, Map<String, String> env)
-
-
Method Details
-
addWaitStrategy
public void addWaitStrategy(Map<String, org.testcontainers.containers.wait.strategy.WaitAllStrategy> strategies, String instanceName, org.testcontainers.containers.wait.strategy.WaitStrategy strategy) can have multiple wait strategies for a single container, e.g. if waiting on several ports if no wait strategy is defined, the WaitAllStrategy will return immediately. The WaitAllStrategy uses the startup timeout for everything as a global maximum, but we expect timeouts to be handled by the inner strategies. -
getProject
- Returns:
- the project name
-
getWaitStrategies
-
start
public void start() -
waitUntilServicesReady
-
startAndWaitUntilServicesReady
-
discoverServiceInstances
public void discoverServiceInstances(boolean checkForRequiredServices) -
stop
public void stop()Stops the services defined in the docker-compose file. -
runWithCompose
-
getServices
-
getEnvVarConfig
-
getExposedPortConfig
-
getNetworks
-
getDefaultNetworkId
-