by Lucasoato · 2y ago · 0 comments
Also I would use a .env file to manage the env variables, without requiring the user to modify the docker compose file. It’s very likely that people will version the yaml file, so it’s not a good idea to keep secrets in plaintext there.
https://docs.docker.com/compose/environment-variables/set-en...
It's very useful to have a complete 'getting started' page that get you from zero to working, without assuming that the reader understands what every intermediate step means. But as you said, the parts that are dependencies for other products can be encapsulated so that savvy users can skip them easily.
Focus the energy of your own docs on your own product itself, and let the docs of your dependencies cover most of the general steps regarding those.
On the installation page, there is a link to the official Docker guide which comes first. That should help other users with an OS-specific installation guide.
Storing passwords or secrets in git should be avoided; the .env file structure allows you to leave untouched the yaml file. Anybody changing it? Git pull, and you’re ready to go, since you didn’t change the yaml file and you don’t have to substitute secrets again.
For secrets, a .env file is fine for local dev and docker-compose IMHO. The "hidden file" nature of a .env is a good fit for secrets. (For prod I prefer K8s Secrets or Vault or similar)
In the end it's just personal preference. I get where you're coming from.