title: docker compose; generate transparent service references
body: <h1>What I do ATM</h1>
  <p>I have a problem with service discovery in my docker-compose.yaml with a dynamic amount of services named 'foo1', 'foo2', 'foo3', ... and one gateway service 'gw'.</p>
  <pre><code>version: &quot;3.8&quot;
  
  services:
    foo1:
      ...
    foo2:
      ...
    foo3:
      ...
    foo4:
      ...
    gw:
      environment:
        - SERVER_URLS=&quot;foo1;foo2;foo3;foo4&quot;
  </code></pre>
  <p>The main reason for the environment variable <strong>SERVER_URLS</strong> in 'gw' is that a 'docker up' will then restart the 'gw' and then I can add a new 'foo5' service by just adding the service itself and extending the SERVER_URLS.</p>
  <h1>Wish - automation</h1>
  <p>My problem is that this SERVER_URLS needs to be extended manually and so it can be forgotten. I wonder if there is something like:</p>
  <pre><code>  gw:
      environment:
        - SERVER_URLS=foo*
  </code></pre>
  <p>Where docker compose generates a new list and only restarts the gw service if there is a change.</p>