A complete example to the article
nginx/Dockerfile- image ofnginxwith installedCertbotnginx/entrypoint.sh- image's entrypointnginx/nginx.conf-nginxconfigurationnginx/renew- certificates renew scriptdocker-compose.yml- compose configuration with letsencrypt volume
- Replace 
example.comwith your domain inentrypoint.shandnginx.conf - Replace 
[email protected]with your email inentrypoint.sh docker-compose builddocker-compose up -d
This code is MIT License.