From a478739f55b858f895b5a0da62b4fcd2442f09c3 Mon Sep 17 00:00:00 2001 From: Peter Wood Date: Mon, 8 Dec 2025 00:49:49 +0000 Subject: [PATCH] fix: Update README and script to include all valid Docker Compose file extensions --- docker-manager/README.md | 2 +- docker-manager/docker-manager.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker-manager/README.md b/docker-manager/README.md index 58f8adb..041abe6 100644 --- a/docker-manager/README.md +++ b/docker-manager/README.md @@ -14,7 +14,7 @@ A Python command-line application to manage Docker containers defined in subdire - Python 3 - Docker and Docker Compose (plugin) installed. - A `~/docker/` directory containing subdirectories for each of your projects. -- Each project subdirectory must contain a `docker-compose.yml` or `compose.yml` file. +- Each project subdirectory must contain a `docker-compose.yml`, `docker-compose.yaml`, `compose.yml`, or `compose.yaml` file. ## Installation diff --git a/docker-manager/docker-manager.py b/docker-manager/docker-manager.py index d343f98..da48cec 100755 --- a/docker-manager/docker-manager.py +++ b/docker-manager/docker-manager.py @@ -3,7 +3,7 @@ Docker Manager Application This script manages Docker containers defined in subdirectories of `~/docker/`. -Each subdirectory is treated as a project and must contain a `docker-compose.yml` or `compose.yml`. +Each subdirectory is treated as a project and must contain a `docker-compose.yml`, `docker-compose.yaml`, `compose.yml`, or `compose.yaml`. Usage Examples: 1. List all running containers: @@ -50,7 +50,10 @@ def get_projects(): for item in DOCKER_ROOT.iterdir(): if item.is_dir(): - if (item / "docker-compose.yml").exists() or (item / "compose.yml").exists(): + if (item / "docker-compose.yml").exists() or \ + (item / "docker-compose.yaml").exists() or \ + (item / "compose.yml").exists() or \ + (item / "compose.yaml").exists(): projects[item.name] = item return projects