Clarify versions of secrets config samples

This commit is contained in:
Maria Bermudez 2018-12-19 17:19:42 -08:00 committed by GitHub
parent aac5701eae
commit c01ab3cbda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -2328,8 +2328,8 @@ stack. The source of the secret is either `file` or `external`.
and will **not** be scoped with the stack name. Introduced in version 3.5 and will **not** be scoped with the stack name. Introduced in version 3.5
file format. file format.
In this example, `my_first_secret` is created (as In this example, `my_first_secret` is created as
`<stack_name>_my_first_secret)`when the stack is deployed, `<stack_name>_my_first_secret `when the stack is deployed,
and `my_second_secret` already exists in Docker. and `my_second_secret` already exists in Docker.
```none ```none
@ -2345,6 +2345,7 @@ is different from the name that exists within the service. The following
example modifies the previous one to use the external secret called example modifies the previous one to use the external secret called
`redis_secret`. `redis_secret`.
### Compose File v3.5 and above
```none ```none
secrets: secrets:
my_first_secret: my_first_secret:
@ -2352,8 +2353,10 @@ secrets:
my_second_secret: my_second_secret:
external: true external: true
name: redis_secret name: redis_secret
```
// Deprecated syntax for compose file version 3.5-
### Compose File v3.4 and under
```none
my_second_secret: my_second_secret:
external: external:
name: redis_secret name: redis_secret