docker-with-compose icon indicating copy to clipboard operation
docker-with-compose copied to clipboard

proposal: include `gettext`

Open iAnanich opened this issue 3 years ago • 2 comments

gettext allows me to use envsubst which is nice for configuring rendering docker-compose.yml with external secrets, networks etc as their names better to be stored as CI variables rather as hardcoded value in docker-compose.yml.

iAnanich avatar Sep 01 '20 11:09 iAnanich

You can use environment variables in docker-compose files: https://docs.docker.com/compose/compose-file/#service-configuration-reference

In any case, there are many different tools that would work for each individual use case, so I would prefer to keep this as simple as possible. If you find yourself needing some other tools frequently, I think it would be better to create a new re-usable image that works best for you.

tiangolo avatar Dec 16 '20 21:12 tiangolo

Fair enough ) Actually, I'm using env vars lately. The reason behind gettext was to make some attributes changeable (like network name, volume name, secret name). But further digging into Docker Compose documentation and newer versions revealed that all of them can have external name specified with env var while keeping internal (in context of single docker compose) name constant.

iAnanich avatar Dec 16 '20 21:12 iAnanich

Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.

github-actions[bot] avatar Nov 11 '22 00:11 github-actions[bot]