title: How to organize architecture of an isomorphic app using docker?
body: <p>I am developing an isomorphic app. The key moment here is that js code on frontend server and on client is the same.</p>
  
  <p>Suppose we have the following services:</p>
  
  <ul>
  <li>frontend</li>
  <li>backend</li>
  <li>comments</li>
  <li>database</li>
  </ul>
  
  <p>Of course each of these services lives in it's own docker container.</p>
  
  <p>And there is a need to access <code>backend</code> and <code>comments</code> services from client side (as <code>api.app.com</code> and <code>comments.app.com</code> respectively).</p>
  
  <p>It seems pretty reasonable to use <code>nginx</code> as reverse proxy here. So these are new containers to be added:</p>
  
  <ul>
  <li>nginx</li>
  <li>consul</li>
  <li>consul-template</li>
  <li>registrator</li>
  </ul>
  
  <p>And the last problem is to resolve <code>*.app.com</code> to <code>nginx</code>. How to achieve this without buying <code>app.com</code> domain? Of course solution is to add DNS to each container and to dev host. But what docker container should I use as DNS server?</p>
  
  <p>Or maybe there is better architecture?</p>