Commit graph

8 commits

Author SHA1 Message Date
Tim Abell
9545538106
Add docker-compose profile support
Implements the design captured in docs/adr/0001-docker-compose-profile-support.md
(jesseduffield/lazydocker#423). Profiles render as pseudo-projects in the
project panel; selecting one filters the services and containers panels to
the services that activate with that profile, and Up/Down/Restart on the
selection use docker compose --profile X invocations.

Key choices:

- Profile is a flag on Project (IsProfile bool), not a new type. Avoids a
  generic-type split across the SideListPanel and CommandObject.

- Reuse existing command templates (Up, Down, DownWithVolumes, Restart,
  AllLogs, DockerComposeConfig). NewCommandObject appends --profile X when
  a profile context is set, so no separate UpProfile/DownProfile/... family
  is needed. Adds a new Restart template (master had no project-level
  restart at all).

- Discovery via 'docker compose config --profiles' and
  'docker compose --profile X config --services', cached on DockerCommand
  for the session. Soft-fails on error (logs once, caches empty) so the UI
  degrades to "no profile rows" rather than popping an error.

- Per-profile service filtering uses the local project and the profile's
  service set (default services + profile-X services, per docker semantics).

- No new keybinding for project/profile restart in this PR; handler exists
  for follow-up discussion.

- New unit tests cover NewCommandObject --profile injection, GetProfiles
  caching, GetProfileServices caching, and the soft-fail path.

fixes: https://github.com/jesseduffield/lazydocker/issues/423

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 14:48:50 +01:00
Jesse Duffield
826f0293f1 Fix types 2025-11-14 21:20:28 +11:00
Martin Cross
dffe6970aa
Short status (#419)
Co-authored-by: Martin Cross <martinidc1992@gmail.com>
2023-07-21 18:22:18 +10:00
Tony Soloveyv
2a9ed70896
Allow to render container stats and configs both in json and yaml (#444) 2023-05-21 14:06:56 +10:00
Tony-Sol
ce95ddea2a
Add networks panel 2023-03-06 01:25:23 +03:00
Jesse Duffield
52040d1d99 better way of rendering to the main view 2022-11-10 19:14:12 +11:00
Jesse Duffield
02a03ed18d move container stats stuff into presentation layer 2022-11-09 21:21:36 +11:00
Jesse Duffield
a87b698761 move things into presentation package 2022-11-09 21:21:36 +11:00