Docker/Compose/Q/What does the secrets key do?
Properties
- logseq-entity
- Logseq/Entity/Question
What does the
secretskey do in Docker/Compose?AI Answer
- Answer/Official from Compose file: secrets reference and How to use secrets in Compose.
- Short answer:
secretslets you hand sensitive data (passwords, tokens, TLS keys) to a service as a read-only file mounted at/run/secrets/<name>, instead of baking it into the image or exposing it through environment variables and the compose file itself. Two levels
Where a secret's value comes from (top-level source)
How a service consumes it
Example
Why use it