HUB
Sign inSign up

holms/nginx-le

By holms

•Updated over 9 years ago

Nginx + Letsencrypt with automatic 60 days update

Image
0

1.2K

holms/nginx-le repository overview

⁠NGINX-LE - Nginx web and proxy with automatic let's encrypt

Simple nginx image (alpine based) with integrated Let's Encrypt⁠ support.

⁠How to use

  • get docker-compose.yml and change things

    • set timezone TZ=UTC for more timezone values check /usr/share/zoneinfo directory
    • set LETSENCRYPT=true if you want automatic certificate install and renewal
    • LE_EMAIL should be your email and LE_FQDN for domain
    • for multiple FQDNs you can pass comma-separated list, like LE_FQDN=aaa.example.com,bbb.example.com
    • alternatively set LETSENCRYPT to false and pass your own cert and key in SSL_CERT and SSL_KEY
  • use 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

⁠Some implementation details

  • image uses alpine's certbot package.
  • script/entrypoint.sh requests LE certificate and will refresh every 60 days.
  • script/le.sh gets SSL
  • nginx-le on docker-hub⁠

⁠Alternatives

Tag summary
Recent tags
Content type
Image
Digest
Size
32.9 MB
Last updated
over 9 years ago
docker pull holms/nginx-le:latest