title: Error trying to run nginx using docker-compose with custom conf.d
body: <p>I'm trying to set up a web server with multiple containers -  but starting with a simple setup for my reverse proxy.</p>
  <p>My <em>docker-compose.yml</em> looks as follows:</p>
  <pre class="lang-yaml prettyprint-override"><code>version: '3'
  
  services:
      reverse-proxy:
          container_name: reverse-proxy
          hostname: reverse-proxy
          image: nginx:latest
          ports:
          - 80:80
          volumes:
          - ./nginx-config/conf.d:/etc/nginx/conf.d
          - ./html:/usr/share/nginx/html
          environment:
              - NGINX_PORT=80
              - ENV=development
  </code></pre>
  <p>Having <em>nginx-config</em> folder structure like:</p>
  <pre><code>nginx-config
  |- templates
    |-default.conf.template
    |- sites-available
      |- mysite.conf.template
  </code></pre>
  <p>And <em>default.conf.template</em> that looks like:</p>
  <pre><code>server {
      listen       ${NGINX_PORT} default_server;
      listen  [::]:${NGINX_PORT} default_server;
      
      server_name  _;
      root   /usr/share/nginx/html;
  
      charset UTF-8;
  
      error_page 404 /notfound.html;
      location = /notfound.html {
          allow   all;
      }
      location / {
          return 404;
      }
  
      access_log off;
      log_not_found off;
      error_log  /var/log/nginx/error.log error;
  }
  </code></pre>
  <p>However, whenever I run <code>docker-compose --context myremote up </code> it doesn´t work, throwing the following output:</p>
  <pre><code>reverse-proxy    | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
  reverse-proxy    | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
  reverse-proxy    | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
  reverse-proxy    | 10-listen-on-ipv6-by-default.sh: Getting the checksum of /etc/nginx/conf.d/default.conf
  reverse-proxy    | 10-listen-on-ipv6-by-default.sh: /etc/nginx/conf.d/default.conf differs from the packaged version, exiting
  reverse-proxy    | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
  reverse-proxy    | /docker-entrypoint.sh: Configuration complete; ready for start up
  </code></pre>
  <p>It all generates the right output under <em>nginx-config/conf.d/default.conf</em> at least on my local machine.</p>
  <p>Is there any way I can take advantage of custom config and templates using docker-compose without running into such an issue?</p>