You've already forked dcmerge
fix(docker-compose): extend YAML marshaler of service.dependsOn
The current implementation of the method DependsOnContainer.MarshalYAML() transform the short syntax into the long syntax. More about booth version types of depends_on is described here: - https://docs.docker.com/reference/compose-file/services/#short-syntax-1 - https://docs.docker.com/reference/compose-file/services/#long-syntax-1 Other applications are not compatible with the long syntax. For this reason the MarshalYAML method has been adapted to take care of the specific syntax. As documented of the long syntax, `depends_on.<dependency>.condition: service_started` is the same as `depends_on: [ 'dependency' ]`, the long syntax will be shortened when no other condition type of a dependency is specified.
This commit is contained in:
@ -0,0 +1,6 @@
|
||||
services:
|
||||
frontend:
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_completed_successfully
|
||||
image: library/frontend:latest
|
@ -0,0 +1,3 @@
|
||||
services:
|
||||
backend:
|
||||
image: library/backend:latest
|
@ -0,0 +1,8 @@
|
||||
services:
|
||||
backend:
|
||||
image: library/backend:latest
|
||||
frontend:
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_completed_successfully
|
||||
image: library/frontend:latest
|
Reference in New Issue
Block a user