Skip to content

Commit 64480fb

Browse files
authored
Fix usage of depends_on condition attribute (#95)
1 parent 7ae6ffd commit 64480fb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

content/en/docs/measuring/usage-scenario.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ services:
8181
gcb-wordpress-apache:
8282
# ...
8383
depends_on:
84-
gcb-wordpress-mariadb: service_healthy
84+
gcb-wordpress-mariadb:
85+
condition: service_healthy
8586
gcb-wordpress-dummy:
8687
# ...
8788
depends_on:
@@ -101,10 +102,10 @@ services:
101102
- `ports:` **[int:int]** *(optional)*
102103
+ Docker container portmapping on host OS to be used with `--allow-unsafe` flag.
103104
- `depends_on:` **[list|dict]** *(optional)*
104-
+ Can either be an list of services names on which the service is dependent. It affects the startup order and forces the dependency to be "ready" before the service is started.
105-
+ Or it can be an dict where each key represents a service as a string. The string then can have two values:
106-
* `service_healthy`: Will wait for the container until the docker *healthcheck* returns *healthy*.
107-
* `service_started`: Similar to the list syntax this will enforce a starting order and just wait until the container has been created.
105+
+ Can either be an list of services names on which the service is dependent. It affects the startup order and forces the dependency to be started (container state = "running") before the service is started.
106+
+ Or it can be an dict where you can specify a condition. The `condition` can have two values:
107+
* `service_healthy`: Will wait for the container until the docker *healthcheck* returns *healthy*.
108+
* `service_started`: Similar to the list syntax -> this will enforce a starting order and just wait until the container state is "running".
108109
- `setup-commands:` **[list]** *(optional)*
109110
+ List of commands to be run before actual load testing. Mostly installs will be done here. Note that your docker container must support these commands and you cannot rely on a standard linux installation to provide access to /bin
110111
- `volumes:` **[list]** *(optional)*
@@ -113,7 +114,7 @@ services:
113114
+ The networks to put the container into. If no networks are defined throughout the `usage_scenario.yml` the container will be put into the default network will all others in the file.
114115
- `healthcheck:` **[dict]** *(optional)*
115116
+ Please see the definition of these arguments and how healthcheck works in the official docker compose definition. We just copy them over: [Docker compose healthcheck specification](https://docs.docker.com/compose/compose-file/compose-file-v3/#healthcheck)
116-
+ `test:` **[str|list]**
117+
+ `test:` **[str|list]**
117118
+ `interval:` **[str]**
118119
+ `timeout:` **[str]**
119120
+ `retries:` **[integer]**

0 commit comments

Comments
 (0)