title: how use docker-compose env file variables in different containers with golang?
body: <pre><code>.
  ├── articaleServer
  │   ├── Dockerfile
  │   ├── main.go
  │   └── sources.json
  ├── butler
  │   ├── Dockerfile
  │   ├── main.py
  │   └── requirements.txt
  ├── docker-compose.yml
  ├── frontEnd
  │   ├── Dockerfile
  │   ├── main.go
  │   ├── tags.json
  │   └── templates
  │       ├── auth.html
  │       ├── feed.html
  │       ├── footer.html
  │       ├── header.html
  │       ├── main.html
  │       └── today.html
  └── server
      ├── Dockerfile
      ├── keys
      │   ├── app.rsa
      │   └── app.rsa.pub
      └── main.go
  </code></pre>
  
  <p>.env</p>
  
  <pre><code>MONGO_USERNSME=user
  MONGO_USERNSME=password
  </code></pre>
  
  <p>I have .env file in path with docker-compose.yml and I need to use variables form it in other containers(articaleServer, butler, server) in go files like</p>
  
  <pre><code>mongoDBDialInfo := &amp;mgo.DialInfo{
          Addrs:    []string{"mongodb://mongo:27017"},
          Username: os.Getenv("MONGO_USERNSME"),
          Password:  os.Getenv("MONGO_PASSWORD"),
      }
  </code></pre>
  
  <p>But go does't see it and pass nil</p>