This container provides a nginx with LetsEncypt enabled. When tested with SSLLabs it should yield and A+ rating. It supports streaming along with the normal proxying support.
EMAIL environment variable specifies the email address that will recieve the notifications when there is a renewal neededDOMAINS environment variable specifies a comma separated list of FQDNs for the certificate. It is expected that the first one would be primary and will be put in the /etc/letsencrypt/live folder. (Comma separated was choses to avoid the hassle of adding extra quotes)/etc/letsencrypt/live folder is missing the init script will start up certbot in standalone mode. This will create the necessary files to enable SSL. Otherwise we would require two configuration files for nginx (one with and one without SSL).The /etc/nginx/conf.d folder is processed and contains deployment specific configurations done through Docker configs. This is not a volume mount. This is processed before deployment.d.
The /etc/nginx/deployment.d folder is also processed and contains deployment specfific configurations that can be mounted as a volume if desired.
/etc/nginx/{conf|deployment}.d/{server_name}.conf.* is expected to contain the virtual server specific configurations. The default configuration will simply return 502 (gateway eror) for every request.
/etc/nginx/{conf|deployment}.d/*.conf.stream is expected to contain stream specific configurations which are useful for passing the request / response as is to an upstream server.
The following is an example of an upstream server called intranet which the nginx server will route to if the request is for i.trajano.net the default default_https is needed to make it do the normal processing specified in the previous paragraph.
upstream intranet {
server intranet:443;
}
map $ssl_preread_server_name $upstream {
default default_https;
i.trajano.net intranet;
}
worker_processes value is adjusted automatically to the number of available CPUs from cgroup, nginx official image hard codes it to 1.worker_processes value is adjusted automatically to the number of available CPUs allocated though so it can handle more load./.well-known/acme-challenge URI will points to /tmp/.well-known/acme-challenge to provide the challenges required by LetsEncrypt for renewals.Content type
Image
Digest
Size
30.4 MB
Last updated
over 6 years ago
docker pull trajano/nginx-letsencrypt