Skip to content

Support for docker profiles #638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

saravanabalagi
Copy link

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
  1. Project panel menu:
image
  1. 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
Copy link
Author

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

@saravanabalagi
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add docker-compose profile support
1 participant