Is there a way to create a list of variables in docker-compose.yml file and create a service for each variable based on template?
E.g. PARAMS=[name_a, name_b, name_c]
Create 3 services:
FOR param IN PARAMS:
my-service-{param}:
build: my-image
container_name: my-container-{param}
environment:
NAME: {param}
SOME_OTHER: ...
This code does not work of course, but the functionality I believe is clear.