3 ms·
How do you manage secrets (e.g. passwords or keys)? I was puzzled by this and came to the conclusion Configuration Management [CM] is best left to the actual C
by drdaeman 10y ago
How do you manage secrets (e.g. passwords or keys)?
I was puzzled by this and came to the conclusion Configuration Management [CM] is best left to the actual CM tools, and Docker just isn't one.
That was in the days docker-compose wasn't even a choice for me, because docs explicitly said that it's not for the production - but even now I don't see a sane way to automatically (re)configure 2-3 hosts[1] in with a single CLI command (and keep the secrets defined in one single "master" place that's outside of version control) with the Docker-provided toolset. Which is dead easy with Salt or Ansible (+bare Docker, of course, since it's Docker containers that are deployed)
(Haven't looked into recently-introduced Docker Swarm, though, maybe they have something there.)
- LeanderK 10y agoyeah, thats still not easy (or trivial, its not hard) for larger projects. I use environment variables for smaller projects, i have predefined environment variables for the images that get substituted for the real thing by docker compose, which in turn uses environment variables (here is an example: https://github.com/intellimate/Server/blob/master/image/compose/production.yml https://github.com/intellimate/Server/blob/master/image/comp...). For larger projects i would use docker-swarm or kubernets, they have their own solution.