diff --git a/src/functions.php b/src/functions.php index 0652381..0202173 100644 --- a/src/functions.php +++ b/src/functions.php @@ -306,7 +306,13 @@ function makeVerticesAndEdges(Graph $graph, array $services, array $volumes, arr $serviceVolumes = []; 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]; }