feat: only make rw mode volume both dir
This commit is contained in:
parent
bdb227b1d8
commit
e0ef69febd
1 changed files with 6 additions and 1 deletions
|
@ -103,7 +103,12 @@ class Graph:
|
||||||
self.add_edge(service.name, network, "links")
|
self.add_edge(service.name, network, "links")
|
||||||
for volume in service.volumes:
|
for volume in service.volumes:
|
||||||
self.add_vertex(volume.source, "volume")
|
self.add_vertex(volume.source, "volume")
|
||||||
self.add_edge(service.name, volume.source, "volumes", lable=volume.target)
|
self.add_edge(
|
||||||
|
service.name,
|
||||||
|
volume.source,
|
||||||
|
"volumes" if "rw" in volume.access_mode else "links",
|
||||||
|
lable=volume.target,
|
||||||
|
)
|
||||||
for expose in service.expose:
|
for expose in service.expose:
|
||||||
self.add_vertex(expose, "port")
|
self.add_vertex(expose, "port")
|
||||||
self.add_edge(expose, service.name, "exposes")
|
self.add_edge(expose, service.name, "exposes")
|
||||||
|
|
Loading…
Reference in a new issue