title: Docker different environment variables for the same service
body: <p>I'm currently building a web scraper with python. But in order to access the specific page, I need an API key and the key is severely limited in terms of requests. So, my idea is to create the python script and set the API key as environment variable for each container. That way, I can scrape with greater throughput.</p>
  <p>Now, my question:</p>
  <p>I know that you can set environment variables through the <code>docker-compose.yml</code> but by doing so, it doesn't make that file shareable through a public repo on git. Is there a better way to set environment variable for each container than through the compose file? I'm thinking with <code>.env</code> files but that makes it a nightmare in the python script as a I have to name each file differently in my folder.</p>
  <p>This is what my compose file looks like for now</p>
  <pre><code>version: '3'
  services:
    user-list_1:
      build: .
      environment:
        - API_KEY=&quot;1212_323131-23&quot;
    user-list_2:
      build: .
      environment:
        - API_KEY=&quot;API_KEYFOR2&quot;
  </code></pre>