opensafely-core / backend-server

Infrastructure code for managing partner hosted OpenSAFELY backend servers.
0 stars 2 forks source link

JOB_SERVER_TOKEN interpolation not working correctly in secrets.env #212

Closed madwort closed 9 months ago

madwort commented 9 months ago

this is not working as expected! have duplicated the key for now to get us up & running.

AIRLOCK_API_TOKEN=${JOB_SERVER_TOKEN}
madwort commented 9 months ago

hmmm maybe that should be

AIRLOCK_API_TOKEN=$(JOB_SERVER_TOKEN)

EDIT: nope!

madwort commented 9 months ago

this is just for compose files, not for environment files, I suppose https://docs.docker.com/compose/compose-file/12-interpolation/

the docs say that the original syntax should work! https://docs.docker.com/compose/compose-file/05-services/#env_file-format

madwort commented 9 months ago

tried all of these, none of which seemed to work:

AIRLOCK_API_TOKEN=$${JOB_SERVER_TOKEN}
AIRLOCK_API_TOKEN="${JOB_SERVER_TOKEN}"
AIRLOCK_API_TOKEN="$${JOB_SERVER_TOKEN}"

using docker-compose version 1.25.0 on test-backend.

madwort commented 9 months ago

fuzzed some other stuff, didn't get a hit, I think let's just duplicate it in the secrets.env for now & consider refactoring it out of existence.