diff --git a/compose/compose-file/index.md b/compose/compose-file/index.md index f1779e7f3f..90a5120965 100644 --- a/compose/compose-file/index.md +++ b/compose/compose-file/index.md @@ -350,6 +350,8 @@ configuration. Two different syntax variants are supported. > [defined in the top-level `configs` configuration](#configs-configuration-reference) > of this stack file, or stack deployment will fail. +For more information on configs, see [configs](/engine/swarm/configs.md). + #### Short syntax The short syntax variant only specifies the config name. This grants the @@ -1372,6 +1374,8 @@ configuration. Two different syntax variants are supported. > [defined in the top-level `secrets` configuration](#secrets-configuration-reference) > of this stack file, or stack deployment will fail. +For more information on secrets, see [secrets](/engine/swarm/secrets.md). + #### Short syntax The short syntax variant only specifies the secret name. This grants the diff --git a/engine/swarm/configs.md b/engine/swarm/configs.md index 4cde35f83e..274f259ff1 100644 --- a/engine/swarm/configs.md +++ b/engine/swarm/configs.md @@ -80,6 +80,12 @@ Docker configs. > simplicity. The examples use Linux containers, but Windows containers also > support configs. +### Defining and using configs in compose files + +Both the `docker compose` and `docker stack` commands support defining configs +in a compose file. See +[the Compose file reference](/compose/compose-file/#configs) for details. + ### Simple example: Get started with configs This simple example shows how configs work in just a few commands. For a @@ -147,7 +153,7 @@ real-world example, continue to $ docker config rm my-config Error response from daemon: rpc error: code = 3 desc = config 'my-config' is - in use by the following service: redis + in use by the following service: redis ``` 6. Remove access to the config from the running `redis` service by updating the @@ -214,7 +220,7 @@ This example assumes that you have PowerShell installed. --config src=homepage,target="\inetpub\wwwroot\index.html" microsoft/iis:nanoserver ``` - + 5. Access the IIS service at `http://localhost:8000/`. It should serve the HTML content from the first step. diff --git a/engine/swarm/secrets.md b/engine/swarm/secrets.md index ef60848435..cabe566b0c 100644 --- a/engine/swarm/secrets.md +++ b/engine/swarm/secrets.md @@ -143,6 +143,12 @@ a similar way, see > support secrets in Docker 17.06 and higher. > See [Windows support](#windows-support). +### Defining and using secrets in compose files + +Both the `docker compose` and `docker stack` commands support defining secrets +in a compose file. See +[the Compose file reference](/compose/compose-file/#secrets) for details. + ### Simple example: Get started with secrets This simple example shows how secrets work in just a few commands. For a