tilt icon indicating copy to clipboard operation
tilt copied to clipboard

Support array of env_file for docker_compose

Open klutzer opened this issue 2 years ago • 3 comments

Describe the Feature You Want

Now we have the option to pass multiple --env-file for docker compose commands, so it'd be great if we could use it inside docker_compose's env_file parameter

Current Behavior

Now is just allowed to pass a single path containing the .env file

Why Do You Want This?

It's now a docker compose feature so we can replicate to Tilt

Additional info:

Issue already closed for docker compose: https://github.com/docker/compose/issues/7326 Feature's pull request: https://github.com/docker/compose/pull/10284

klutzer avatar Mar 30 '23 23:03 klutzer

The only trickiness is we'll have to do a version check on docker compose, since this requires 2.17+

nicks avatar Mar 31 '23 21:03 nicks

We can maybe merge the env files into a single one for internal use, in such cases of 2.16-. So the user will have the feature even for non-compatible docker compose versions.

klutzer avatar Apr 03 '23 14:04 klutzer

are we asking to support top-level env_file in compose.yml ?

That would be nice to replace long docker compose --env-file .env --env-file .secrets config command with short docker compose config

xmlking avatar Nov 18 '23 20:11 xmlking