Closed bloodearnest closed 2 months ago
huh, weird, I'm sure I tried to do that (setting an env var based on another var) some time ago & couldn't get it to work at all.
actually, my guess is that env files can interpolate from vars set in the shell environment but not from vars set in other env files. finding this in the docker docs is left as an exercise to the reader...
actually, my guess is that env files can interpolate from vars set in the shell environment but not from vars set in other env files. finding this in the docker docs is left as an exercise to the reader...
Huh, yeah, that's probably it
We define
AIRLOCK_API_TOKEN=$JOB_SERVER_TOKEN
in 02_secrets.env, which works fine when JOB_SERVER_TOKEN is defined beforehand. But the tests/config.env gets added to 04_local.env, which sets JOB_SERVER_TOKEN to a test value later on.For some reason, in 20.04, this was no problem, and AIRLOCK_API_TOKEN was set to the right test value. But in 22.04, docker-compose ends up not setting AIRLOCK_API_TOKEN from the 04_secret.env values.
I am not sure why, but possibly some difference means that docker-compose loads envfiles differently, but this is more strict so is not a bad thing.