diff --git a/_pants/py_deploy.py b/_pants/py_deploy.py index b51c787..bc8fc90 100644 --- a/_pants/py_deploy.py +++ b/_pants/py_deploy.py @@ -25,7 +25,7 @@ def as_healthcheck_command(healthcheck: dict) -> str: - """only healthchecks with port and path are supported now""" + """only healthchecks with port/py_module/cmd are supported now""" cmd = healthcheck.get("cmd", healthcheck.get("CMD")) port = healthcheck.get("port") path = healthcheck.get("path", "/") @@ -40,7 +40,7 @@ def as_healthcheck_command(healthcheck: dict) -> str: elif py_module: script_path = py_module.replace(".", "/") healthcheck["python_major_minor"] = PYTHON_MAJOR_MINOR - cmd = f"/bin/app/lib/python{PYTHON_MAJOR_MINOR}/site-packages/{script_path}.py" + cmd = f"python /bin/app/lib/python{PYTHON_MAJOR_MINOR}/site-packages/{script_path}.py" options = " ".join( f"--{name}={healthcheck.get(name, default)}" for name, default in default_healthcheck_options diff --git a/docker_compose_parser/src/docker_compose_parser/file_models.py b/docker_compose_parser/src/docker_compose_parser/file_models.py index 8668f4c..fccd65f 100644 --- a/docker_compose_parser/src/docker_compose_parser/file_models.py +++ b/docker_compose_parser/src/docker_compose_parser/file_models.py @@ -38,7 +38,7 @@ def _find_test(healthcheck: dict) -> Optional[str]: elif py_module: script_path = py_module.replace(".", "/") py_major_minor = healthcheck["python_major_minor"] - cmd = f"/bin/app/lib/python{py_major_minor}/site-packages/{script_path}.py" + cmd = f"python /bin/app/lib/python{py_major_minor}/site-packages/{script_path}.py" else: raise NotImplementedError # should never happen, if condition return cmd