Skip to content

Commit 8a1cba7

Browse files
committed
Add docs for compose default wait strategy.
1 parent ed0fbbf commit 8a1cba7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/features/compose.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ const environment = await new DockerComposeEnvironment(composeFilePath, composeF
4141
.up();
4242
```
4343

44+
### With a default wait strategy
45+
46+
By default Testcontainers uses the "listening ports" wait strategy for all containers. If you'd like to override
47+
the default wait strategy for all services, you can do so:
48+
49+
```javascript
50+
const environment = await new DockerComposeEnvironment(composeFilePath, composeFile)
51+
.withDefaultWaitStrategy(Wait.forHealthCheck())
52+
.up();
53+
```
54+
4455
### With a pull policy
4556

4657
Testcontainers will automatically pull an image if it doesn't exist. This is configurable:

0 commit comments

Comments
 (0)