Skip to content

Commit 6dd6d01

Browse files
committed
improve config section
1 parent e9f884b commit 6dd6d01

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

docs/concepts/compose.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,15 @@ The environment variables to set.
154154
```yaml
155155
environment:
156156
DATABASE_USER: someuser
157-
DATABASE_PASSWORD: # leave blank/null to set config
158157
```
159-
160-
The above uses *map notation*. Defang also supports using *list notation*:
158+
:::info
159+
For sensitive environment variables (or secret values), you should list the variable's name with a blank or `null` value, and then securely set their actual value with `defang config` in the CLI. See our [Configuration page](/docs/concepts/configuration) for more.
160+
161+
For example:
161162
```yaml
162-
environment:
163-
- DATABASE_USER=someuser
164-
- DATABASE_PASSWORD
163+
- DATABASE_USER=someuser # env var loaded with this literal value
164+
- DATABASE_PASSWORD # env var loaded using defang config
165165
```
166-
167-
:::info
168-
After you set sensitive environment variables as blank or `null` values in the `compose.yaml` file, you can securely set their actual value in the Defang CLI. See our [Configuration page](/docs/concepts/configuration) for more.
169166
:::
170167

171168
### `healthcheck`

0 commit comments

Comments
 (0)