As of 2017-7-31, this no longer suits my purpose. Here’s my updated docker-compose version 3 approach.
nginx-proxy has been my go-to for easy certificate configuration for some time now. I was relieved to learn that I am still be able to leverage this tool with the help of the
This document outlines the process by which Let’s Encrypt certificates are managed for a single
nginx container behind an
nginx-proxy accompanied by the
docker-compose is used to manage the overall configuration. It was proven on Ubuntu 16.04. Naturally, it is assumed that Docker and Compose are already installed. Copying and pasting the commands provided should lead to a successful deployment.
nginx-proxy proxies multiple site. I’m only serving one with
nginx. I like to put all my individual Docker compositions in their own directories:
The following assumes you have some sort of site you want to serve up from the
mysite/ directory. If not, just create a simple Hello, world! HTML page. Copy and paste the following to
docker-compose to serve up your site with
nginx. Copy and paste the following to a file called
This will serve up files from the current directory (i.e., the same one that contains the new
index.html page, if created).
The site won’t be accessible yet. That comes next.
As before, put the
nginx-proxy Docker compositions in its own directory:
Create a directory in which to store the Let’s Encrypt certificates:
Copy and paste the following to a file called
nginx-proxy to combine forces with
docker-letsencrypt-nginx-proxy-companion, all in one
If all is well, you should be able to access your site at the address configured.