From b064aab289aa241b1238f694c82fcfdb4464b766 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 24 Dec 2023 22:35:27 +0100 Subject: [PATCH] added -p parameter for healing --- roles/heal-docker/files/heal-docker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/heal-docker/files/heal-docker.py b/roles/heal-docker/files/heal-docker.py index e570a37f..6fefab26 100644 --- a/roles/heal-docker/files/heal-docker.py +++ b/roles/heal-docker/files/heal-docker.py @@ -64,7 +64,8 @@ for filtered_failed_docker_compose_repository in filtered_failed_docker_compose_ if compose_file_path: print("Restarting unhealthy container in:", compose_file_path) - print_bash(f'cd {os.path.dirname(compose_file_path)} && docker-compose restart') + # Propably the cd is not necessary. But in rare cases it could be. To lazzy to test it now. + print_bash(f'cd {os.path.dirname(compose_file_path)} && docker-compose -p "{filtered_failed_docker_compose_repository}" restart') else: print("Error: Docker Compose file not found for:", filtered_failed_docker_compose_repository) errors += 1