From 41f82300c5fe3cc21550abc57d4173bbea93e8e9 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Fri, 21 Jul 2023 11:12:41 -0600 Subject: [PATCH] Fix data dir create path --- app/deployment_create.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/deployment_create.py b/app/deployment_create.py index fb83f39b..722d8e93 100644 --- a/app/deployment_create.py +++ b/app/deployment_create.py @@ -67,7 +67,8 @@ def _get_named_volumes(stack): def _create_bind_dir_if_relative(volume, path_string, compose_dir): path = Path(path_string) if not path.is_absolute(): - absolute_path = Path(compose_dir).parent.joinpath(path) + absolute_path = Path(compose_dir).joinpath(path) + print(f"Creating this directory: {absolute_path}") absolute_path.mkdir(parents=True, exist_ok=True) else: if not path.exists(): @@ -84,7 +85,7 @@ def _fixup_pod_file(pod, spec, compose_dir): for volume in pod_volumes.keys(): if volume in spec_volumes: volume_spec = spec_volumes[volume] - volume_spec_fixedup = volume_spec if Path(volume_spec).is_absolute() else f".{volume_spec}" + volume_spec_fixedup = volume_spec if Path(volume_spec).is_absolute() else f"{volume_spec}" _create_bind_dir_if_relative(volume, volume_spec, compose_dir) new_volume_spec = {"driver": "local", "driver_opts": {