docker-compose.yml reusable variables code example
Example: docker-compose.yml reusable variables
you can do it through env vars also a .env file in the same directory as docker-compose.yml will be referenced and all vars can be used through ${} style interpolation