Skip to content

Commit

Permalink
fix depends_on
Browse files Browse the repository at this point in the history
  • Loading branch information
muayyad-alsadi committed Jun 17, 2019
1 parent c748807 commit e753eb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions podman-compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ def tr_cntnet(project_name, services, given_containers):
)
for cnt0 in given_containers:
cnt = dict(cnt0, network_mode="container:"+infra_name)
deps = cnt.get("depends") or []
deps = cnt.get("depends_on") or []
deps.append(infra_name)
cnt["depends"] = deps
cnt["depends_on"] = deps
# adjust hosts to point to localhost, TODO: adjust host env
adj_hosts(services, cnt, '127.0.0.1')
if "hostname" in cnt:
Expand Down Expand Up @@ -500,7 +500,7 @@ def flat_deps(services, container_by_name):
for name, cnt in container_by_name.items():
deps = set([(c.split(":")[0] if ":" in c else c)
for c in cnt.get("links", [])])
deps.update(cnt.get("depends", []))
deps.update(cnt.get("depends_on", []))
cnt["_deps"] = deps
for name, cnt in container_by_name.items():
rec_deps(services, container_by_name, cnt, cnt.get('_service'))
Expand Down

0 comments on commit e753eb3

Please sign in to comment.