Pass incremental variable to CMD for each scaled service in docker-compose

Did you come up with a solution? I have the same issue: An iterator available in docker-compose 3.4?