defang icon indicating copy to clipboard operation
defang copied to clipboard

Setting config from interpolated values in compose.yaml

Open raphaeltm opened this issue 6 months ago • 1 comments

At the moment, something like this turns into an empty string:

  environment:
    KEY: ${ENV_VAR}

This is because we decided we don't want to accidentally expose a user's local env to the cloud and push any sensitive values. The result of this can be confusing (See #596), because it always gets set to an empty string by default.

But there are cases where the user may want to expose the value to Defang and push it to the cloud. Namely, in CI, the ergonomics of treating those env vars as sensitive configs would make it really easy to deploy: users could manage their config vals as GitHub secrets, expose them to the workflow and automatically have their config values set.

So the proposal here is to look for CI=true, and if it is, then expose the local env to Defang, which would set each of the corresponding config vals.

raphaeltm avatar Aug 01 '24 00:08 raphaeltm