Nginx + Letsencrypt with automatic 60 days update
1.2K
Simple nginx image (alpine based) with integrated Let's Encrypt support.
get docker-compose.yml and change things
TZ=UTC for more timezone values check /usr/share/zoneinfo directoryLETSENCRYPT=true if you want automatic certificate install and renewalLE_EMAIL should be your email and LE_FQDN for domainLE_FQDN=aaa.example.com,bbb.example.comLETSENCRYPT to false and pass your own cert and key in SSL_CERT and SSL_KEYuse provided etc/service-example.conf to make your own. Keep both ssl_certificate SSL_CERT; and ssl_certificate_key SSL_KEY;
make sure volumes in docker-compose.yml changed to your service config
you can map multiple config files in compose, for instance - ./conf.d:/etc/nginx/conf.d
pull image - docker-compose pull
if you don't want pre-built image, make you own. docker-compose build will do it
start it docker-compose up
certbot package.script/entrypoint.sh requests LE certificate and will refresh every 60 days.script/le.sh gets SSLdocker pull holms/nginx-le:latest