title: how to use a environmental variable as Bind-Ip in mongo db configuration file (mongod.conf)
body: <p>I'm a newbie in mongodb and As far as I have seen, we always pass constant IP values like 127.0.0.1 or 172.17.0.5 as Bind IP in mongod.conf file.</p>
  
  <p>This is the bind ip configuration in my mongod.conf></p>
  
  <pre><code>net:
    port: 27017
    bindIp: 127.0.0.1, 172.17.0.5  # Listen to local interface only, comment to listen on all interfaces.
  </code></pre>
  
  <p>I have defined an environmental variable in /etc/environment file
  DHOST= 172.17.0.5</p>
  
  <p>When I try to give Below configuration in mongod.conf, I cannot connect to mongo shell:</p>
  
  <pre><code>net:
    port: 27017
    bindIp: 127.0.0.1, *$DHOST*  # Listen to local interface only, comment to listen on all interfaces.
  </code></pre>
  
  <p>Please help me to add a ENV var as bind ip in mongo db configuration</p>