mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-22 15:11:02 +00:00
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> |
||
|---|---|---|
| .. | ||
| panels | ||
| presentation | ||
| types | ||
| app_status_manager.go | ||
| arrangement.go | ||
| confirmation_panel.go | ||
| container_logs.go | ||
| containers_panel.go | ||
| custom_commands.go | ||
| filtering.go | ||
| focus.go | ||
| gocui.go | ||
| gui.go | ||
| images_panel.go | ||
| keybindings.go | ||
| layout.go | ||
| main_panel.go | ||
| menu_panel.go | ||
| networks_panel.go | ||
| options_menu_panel.go | ||
| panels.go | ||
| project_panel.go | ||
| services_panel.go | ||
| sort_container_test.go | ||
| subprocess.go | ||
| tasks_adapter.go | ||
| theme.go | ||
| view_helpers.go | ||
| views.go | ||
| volumes_panel.go | ||
| window.go | ||