-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for DependsOn #5597
Add documentation for DependsOn #5597
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR @QuinnBast ! not a native speaker but I made a suggestion on the wording. Please run ./gradlew spotlessApply
docs/features/startup_and_waits.md
Outdated
@@ -1,5 +1,13 @@ | |||
# Waiting for containers to start or be ready | |||
|
|||
## Depending on another container | |||
|
|||
When using multiple containers, it is possible that one container that you are starting relies on the other to be started before it should be started itself. An example of this might be a database that needs to be started before your application container can link to it. You can tell a container that it depends on another container by using the `dependsOn` method: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using multiple containers, it is possible that one container that you are starting relies on the other to be started before it should be started itself. An example of this might be a database that needs to be started before your application container can link to it. You can tell a container that it depends on another container by using the `dependsOn` method: | |
Sometimes, a container relies on another container to be ready before it should start itself. An example of this might be a database that needs to be started before your application container can link to it. You can tell a container that it depends on another container by using the `dependsOn` method: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Had some issues with ./gradlew spotlessApply
but I think I figured it out.
a556beb
to
9fb1221
Compare
docs/features/startup_and_waits.md
Outdated
@@ -1,5 +1,13 @@ | |||
# Waiting for containers to start or be ready | |||
|
|||
## Depending on another container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make sense to add it to the end of the page, after we talk about the concept of waiting, as otherwise it is a bit too early
public GenericContainer<?> redis = new GenericContainer<>("redis:3.0.2").withExposedPorts(6379); | ||
|
||
@Rule | ||
public GenericContainer<?> nginx = new GenericContainer<>(DockerImageName.parse("nginx:1.9.4")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public GenericContainer<?> nginx = new GenericContainer<>(DockerImageName.parse("nginx:1.9.4")) | |
public GenericContainer<?> nginx = new GenericContainer<>("nginx:1.9.4") |
thanks for the pr @QuinnBast ! this is now merged in master |
Adds documentation for using the
dependsOn
function. See here