The closest we can get to that structure with TOML would be something like this:
[containers.env]
GLOBAL_ENV = "value"
OVERRIDABLE_ENV = "global_value"
[containers.nginx]
image = "nginx:latest"
[containers.nginx.env]
NGINX_ENV = "nginx"
[containers.echo]
image = "traefik/whoami:latest"
[containers.echo.env]
OVERRIDABLE_ENV = "echo_value"
So the first problem is that env
looks like a container name, so that would probably needs to be something like [containers.__global__.env]
. Or perhaps we just use the existing [env]
section. And for those who don’t care for TOML, we support JSON and YAML too.
While none of this is hard, once implemented it will be something we will need to support indefinitely. For this reason, I’d like to understand why, for example, you would want to be able to override your nginx image from within your TOML. Why wouldn’t you simply update your machine_config
?