Class ComposeProject.Builder

java.lang.Object
io.quarkus.devservices.deployment.compose.ComposeProject.Builder
Enclosing class:
ComposeProject

public static class ComposeProject.Builder extends Object
  • Constructor Details

  • Method Details

    • withDockerClient

      public ComposeProject.Builder withDockerClient(com.github.dockerjava.api.DockerClient dockerClient)
      Set the docker client to use for the compose project.
      Parameters:
      dockerClient - the docker client to use
      Returns:
      this
    • withStopContainers

      public ComposeProject.Builder withStopContainers(boolean stopContainers)
      Set whether to stop containers when the project is stopped.
      Parameters:
      stopContainers - whether to stop containers when the project is stopped
      Returns:
      this
    • withRyukEnabled

      public ComposeProject.Builder withRyukEnabled(boolean ryukEnabled)
      Set whether to stop containers when the project is stopped.
      Parameters:
      ryukEnabled - whether to stop containers when the project is stopped
      Returns:
      this
    • withStartupTimeout

      public ComposeProject.Builder withStartupTimeout(Duration duration)
      Set the startup timeout for the compose project.
      Parameters:
      duration - the startup timeout
      Returns:
      this
    • withStopTimeout

      public ComposeProject.Builder withStopTimeout(Duration duration)
      Set the stop timeout for the compose project.
      Parameters:
      duration - the startup timeout
      Returns:
      this
    • withBuild

      public ComposeProject.Builder withBuild(Boolean build)
      Set whether to build the images before starting the compose project.
      Parameters:
      build - whether to build the images before starting the compose project
      Returns:
      this
    • withEnv

      public ComposeProject.Builder withEnv(Map<String,String> envVariables)
      Set environment variables to pass to the compose command.
      Parameters:
      envVariables - the environment variables to pass to the compose command
      Returns:
      this
    • withOptions

      public ComposeProject.Builder withOptions(List<String> options)
      Set the options to pass to the compose command.
      Parameters:
      options - the options to pass to the compose command
      Returns:
      this
    • withProfiles

      public ComposeProject.Builder withProfiles(List<String> profiles)
      Set the profiles for the compose project.
      Parameters:
      profiles - the profiles for the compose project
      Returns:
      this
    • withScalingPreferences

      public ComposeProject.Builder withScalingPreferences(Map<String,Integer> scalingPreferences)
      Set the scaling preferences for the compose project.
      Parameters:
      scalingPreferences - the scaling preferences for the compose project
      Returns:
      this
    • withFollowContainerLogs

      public ComposeProject.Builder withFollowContainerLogs(boolean followContainerLogs)
      Set whether to follow the container logs.
      Parameters:
      followContainerLogs - whether to follow the container logs
      Returns:
      this
    • withRemoveImages

      public ComposeProject.Builder withRemoveImages(String removeImages)
      Remove images after containers shutdown.
      Returns:
      this instance, for chaining
    • withRemoveVolumes

      public ComposeProject.Builder withRemoveVolumes(boolean removeVolumes)
      Remove volumes after containers shut down.
      Parameters:
      removeVolumes - whether volumes are to be removed.
      Returns:
      this instance, for chaining.
    • withProject

      public ComposeProject.Builder withProject(String project)
      Set the project name for the compose project.
      Parameters:
      project - the project name for the compose project
      Returns:
      this
    • build

      public ComposeProject build()