lazydocker icon indicating copy to clipboard operation
lazydocker copied to clipboard

Support for docker profiles

Open saravanabalagi opened this issue 7 months ago • 2 comments
trafficstars

Support for docker profiles

  • Project panel also shows profiles available
  • Up and down profiles in project panel optionally with volumes
  • Up and down profiles in services panel as well

Closes #423


Why is it in project and not in a separate panel?

  • Profiles behave like project, upping profile starts all base services (without any profiles assigned) and any service that has the profile name listed under profiles key
  • In one sense, the project itself is a profile
  • So it made sense to me to have this in the project panel

What about keybindings?

  • u and d ups and downs profiles, very much like how these ups/downs a service in services panel
  • U and D shows menu to up and down project/profile, very much like how they behave in services panel

I made these choices because it felt intuitive and found it comfortable during my daily driving the same.


Screenshots:

  1. Project panel: image

  2. Project panel menu: image

  3. Services panel menu: image


FAQs:

  1. I upped the base services by upping the project, then upped services for profile_n. But when down profile_n, it also shuts down base services?

Yes, that's because upping profile_n will also start base services. And downing will shut down base services as well. This is how --profile works in docker CLI.

  1. What is needed if I want d to down only services pertaining to profile_n?

It felt to me that this would be intuitive than shutting down base services additionally. But unfortunately, AFAIK in order to achieve this behavior, we need to find a list of all services and filter the ones that belong to the profile and then run down individually on each service.

saravanabalagi avatar Mar 28 '25 01:03 saravanabalagi

Heads up, I also updated missing translations, so the PR will show too many changes.

saravanabalagi avatar Mar 28 '25 01:03 saravanabalagi