Skip to content

Commit 87d6d51

Browse files
committed
Explain what happens if docker compose is already running
Closes gh-36483
1 parent de1ca5e commit 87d6d51

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/docker-compose.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@ Add the module dependency to your build, as shown in the following listings for
2828
}
2929
----
3030

31+
NOTE: The `docker compose` or `docker-compose` CLI application needs to be on your path in order for Spring Boot’s support to work correctly.
32+
3133
When this module is included as a dependency Spring Boot will do the following:
3234

3335
* Search for a `compose.yml` and other common compose filenames in your application directory
3436
* Call `docker compose up` with the discovered `compose.yml`
3537
* Create service connection beans for each supported container
3638
* Call `docker compose stop` when the application is shutdown
3739

38-
NOTE: The `docker compose` or `docker-compose` CLI application needs to be on your path in order for Spring Boot’s support to work correctly.
40+
If the Docker Compose services are already running when starting the application, Spring Boot will only create the service connection beans for each supported container.
41+
It will not call `docker compose up` again and it will not call `docker compose stop` when the application is shutdown.
3942

4043
NOTE: By default, Spring Boot's Docker Compose support is disabled when running tests.
4144
To enable it, set configprop:spring.docker.compose.skip.in-tests[] to `false`.

0 commit comments

Comments
 (0)