Merge pull request #40 from karlwilbur/volumes-long-syntax
Support "Long Syntax" for volumes.
This commit is contained in:
commit
c025ca9266
1 changed files with 7 additions and 1 deletions
|
@ -306,7 +306,13 @@ function makeVerticesAndEdges(Graph $graph, array $services, array $volumes, arr
|
||||||
$serviceVolumes = [];
|
$serviceVolumes = [];
|
||||||
|
|
||||||
foreach ($definition['volumes'] ?? [] as $volume) {
|
foreach ($definition['volumes'] ?? [] as $volume) {
|
||||||
list($host, $container, $attr) = explodeMapping($volume);
|
if (is_array($volume)) {
|
||||||
|
$host = $volume['source'];
|
||||||
|
$container = $volume['target'];
|
||||||
|
$attr = !empty($volume['read-only']) ? 'ro' : '';
|
||||||
|
} else {
|
||||||
|
list($host, $container, $attr) = explodeMapping($volume);
|
||||||
|
}
|
||||||
|
|
||||||
$serviceVolumes[$container] = [$host, $attr];
|
$serviceVolumes[$container] = [$host, $attr];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue