Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions content/reference/compose-file/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,11 @@ configs:
environment: "SIMPLE_CONFIG_VALUE"
```

> [!IMPORTANT]
>
> The `environment` and `content` sources aren't supported by
> `docker stack deploy`: the command fails to read the config. Use the
> `file` source, or an [`external`](/manuals/engine/swarm/configs.md)
> config created with `docker config create`.

If `external` is set to `true`, all other attributes apart from `name` are irrelevant. If Compose detects any other attribute, it rejects the Compose file as invalid.
7 changes: 7 additions & 0 deletions content/reference/compose-file/secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ secrets:
environment: "OAUTH_TOKEN"
```

> [!IMPORTANT]
>
> The `environment` source isn't supported by `docker stack deploy`:
> the command fails to read the secret. Use the `file` source, or an
> [`external`](/manuals/engine/swarm/secrets.md) secret created with
> `docker secret create`.

## Additional resources

For more information, see [How to use secrets in Compose](/manuals/compose/how-tos/use-secrets.md).