Follow-up to v1.21.0's Container Groups upgrade. Closes the loop on the "where do I even start" question — instead of clicking through a multi-select for every group, scan the host for stacks Docker already knows about and let you import them in bulk.
Added
🔍 Auto-detect Compose / Portainer / Swarm stacks
New button on the /groups page. Opens a modal listing every detected stack:
- Compose / Portainer / Dockge / podman-compose stacks (via the standard
com.docker.compose.projectlabel) - Docker Swarm stacks (via
com.docker.stack.namespace)
Per stack you can:
- Check / uncheck the whole stack to include or skip
- Drag-and-drop members to set head order (first = head, gets
restart_dependentssemantics when enabled) - Include / exclude individual containers from a stack via per-row checkbox
- Toggle
restart_dependentsper stack — conservative default (off); user opts in - See conflict badges:
↻ <group>when a container is already in another Docksentry group (moves on import),netnswhen a container shares a network namespace (VPN-sidecar hint),already importedwhen a same-named group exists
Smoke-tested on the maintainer's own host: 9 real stacks detected correctly (Nextcloud's 3-container set with db+redis+webserver, Paperless-NGX's 3-container set with broker+db+webserver, InfluxDB+NodeRed pair, plus 6 single-container projects).
Changed
Legacy Settings → Groups card is now a thin banner
The card stays — bookmarks pointing at /settings#groups continue to work — but the duplicated CRUD UI is gone. The button takes you to /groups where all the actual functionality lives. The v1.21.0 _groups_html helper is now dead code (kept for one release in case anything still calls it; removal slated for v1.22.0).
API
/api/groups_detect(GET) — scan + group containers by stack label, return JSON{ok, stacks: [{name, source, containers, conflicts, exists}]}. Read-only./api/groups_import_batch(POST) — accepts repeatedstacks=<json>form values, each carrying{name, containers, restart_dependents, wait_seconds}. Same-named existing groups update in place. Returns{ok, created}.
Notes
- Manual
docker runcontainers (no Compose project label) can't be auto-detected — they still go through the manual "+ New group" form. Auto-detect is for the 95% of real setups where stacks are Compose / Portainer / Dockge / Swarm-managed. - No env vars or breaking changes.
Upgrade
docker pull amayer1983/docksentry:latest
docker compose up -dHard-reload the Web UI once so the new modal CSS + JS lands.