docker.el icon indicating copy to clipboard operation
docker.el copied to clipboard

Question: multiple projects with multiple docker-compose files

Open noorul opened this issue 3 years ago • 11 comments

I work on multiple projects with multiple compose files.

project1 -> compose-p1-1.yaml, compose-p1-2.yaml project2 -> compose-p2-1.yaml, compose-p2-2.yaml

Every time I need to run compose command I have to switch to the project using projectile and then use C-c d F. Is there a way to configure compose file at the project level? Or is there a better workflow?

noorul avatar Feb 09 '22 16:02 noorul

Duplicate of #137

Silex avatar Feb 09 '22 16:02 Silex

I think I was not able to convey the question properly. I updated the question.

noorul avatar Feb 09 '22 17:02 noorul

Ah, good question.

@tarsius: is there a transient mechanism so we are able to store transient default settings per projectile projet?

Maybe by having projectile modify transient-values-file each time a projet changes?

Silex avatar Feb 09 '22 18:02 Silex

No, but such functionality is planned. I just opened https://github.com/magit/transient/issues/189 to track this.

(FWIW my plans for the next few months are: Feb: personal stuff, Mar: undisclosed stuff, Apr: transient.)

tarsius avatar Feb 09 '22 19:02 tarsius

Maybe by having projectile modify transient-values-file each time a projet changes?

Worth a try but it might break in the future.

tarsius avatar Feb 09 '22 20:02 tarsius

@noorul: I think editing a .dir-locals.el that sets transient-values to the appropriate thing should work, see the linked issue (that is, until it's directly supported by transient).

If you want to play with it give us some feedback :wink:

Silex avatar Feb 11 '22 09:02 Silex

Is there any documentation with any example? I am looking for a sample format. It has the following value:

((docker) (magit-file-dispatch) (magit-submodule))

noorul avatar Feb 14 '22 03:02 noorul

@tarsius @Silex Any help to understand how can one set transient-values with an example will be great.

noorul avatar Feb 17 '22 03:02 noorul

If I had an example to give you I'd have done so.

I have more urgent things to do (e.g the magit-like process buffer when you press $), so the idea was that you try to find out how it works and build an example, see if that route works or not. Maybe it's a dead end.

Silex avatar Feb 17 '22 08:02 Silex

I see

noorul avatar Feb 17 '22 08:02 noorul

(I am in a similar boat as @Silex, also busy and my tip also is just "something along those lines might work, give it a try".)

tarsius avatar Feb 17 '22 11:02 tarsius