title: Adding SSL certs to NGINX docker container
body: <p>I'm trying to add SSL certs (generated with LetsEncrypt) to my nginx. The nginx is built from a docker-compose file where I create a volume from my host to the container so the containers can access the certs and private key.</p>
  
  <pre><code>volumes:
    - /etc/nginx/certs/:/etc/nginx/certs/
  </code></pre>
  
  <p>When the nginx container starts and fails with the following error </p>
  
  <pre><code>[emerg] 1#1: BIO_new_file("/etc/nginx/certs/fullchain.pem") failed 
  (SSL: error:02001002:system library:fopen:No such file or 
  directory:fopen('/etc/nginx/certs/fullchain.pem','r') 
  error:2006D080:BIO routines:BIO_new_file:no such file)
  </code></pre>
  
  <p>My nginx config file looks like this:</p>
  
  <pre><code>server {
      listen 80;
      server_name server_blah www.server_blah;
      return 301 https://$server_name$request_uri;
  }
  
  server {
      listen 443 ssl;
      server_name server_blah;
      ssl_certificate      /etc/nginx/certs/fullchain.pem;
      ssl_certificate_key  /etc/nginx/certs/privkey.pem;
      ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
      ssl_ciphers         HIGH:!aNULL:!MD5;
  }
  </code></pre>
  
  <p>What am I missing/doing incorrectly?</p>