diff --git a/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc b/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc index 18f1940d795..038d1600964 100644 --- a/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc +++ b/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc @@ -343,6 +343,10 @@ The following values are supported: In addition you can use the configprop:spring.docker.compose.start.command[] property to change whether `docker compose up` or `docker compose start` is used. The configprop:spring.docker.compose.stop.command[] allows you to configure if `docker compose down` or `docker compose stop` is used. +You can also pass additional arguments to Docker Compose commands. +The configprop:spring.docker.compose.arguments[] property allows you to specify arguments that are passed to all Docker Compose commands. +The configprop:spring.docker.compose.start.arguments[] property allows you to specify arguments that are passed only to the up (or start) command, while the configprop:spring.docker.compose.stop.arguments[] property allows you to specify arguments that are passed only to the down (or stop) command. + The following example shows how lifecycle management can be configured: [configprops,yaml] @@ -351,11 +355,20 @@ spring: docker: compose: lifecycle-management: start-and-stop + arguments: + - "--project-name=myapp" + - "--progress=auto" start: - command: start + command: up + arguments: + - "--build" + - "--force-recreate" stop: command: down timeout: 1m + arguments: + - "--volumes" + - "--remove-orphans" ----