DavesCodeMusings / container-central

A minimalist, not quite ready for prime time solution to managing Docker containers.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Cross-reference containers with projects #14

Closed DavesCodeMusings closed 2 years ago

DavesCodeMusings commented 2 years ago

Rather than showing docker-compose files as read-only yaml, parse them in central.js to extract information container names (either set by container-name property or generated as project_service by docker-compose.) This can be used to determine project status (up/down) and cross-reference containers by examining individual 'services' listed. Could also extract volume names and cross-reference using 'volumes'.

The NPM package YAML can do this. https://www.npmjs.com/package/yaml

DavesCodeMusings commented 2 years ago

Might be more reliable to use: com.docker.compose.project. (For example: com.docker.compose.project: "home-automation") Read from /containers API call and group together based on this label to determine project membership.

DavesCodeMusings commented 2 years ago

Enhancement added to latest and x86.