Merge pull request #29 from cerc-io/dboreham/compose-ps

Implement deploy-system status command
This commit is contained in:
David Boreham 2022-10-24 16:03:19 -06:00 committed by GitHub
commit 20fae9f2c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,10 +79,16 @@ def command(ctx, include, exclude, cluster, command):
if verbose: if verbose:
print("Running compose down") print("Running compose down")
docker.compose.down() docker.compose.down()
elif command == "ps": elif command == "status":
if verbose: if verbose:
print("Running compose ps") print("Running compose ps")
docker.compose.ps() container_list = docker.compose.ps()
if len(container_list) > 0:
print("Running containers:")
for container in container_list:
print(f"id: {container.id}, name: {container.name}")
else:
print("No containers running")
elif command == "logs": elif command == "logs":
if verbose: if verbose:
print("Running compose logs") print("Running compose logs")