DOTOCA / nginx-le

Nginx with automatic let's encrypt (docker image)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 LETSENCRYPT=true if you want automatic certificate install and renewal
    • LE_EMAIL should be your email and LE_FQDN for domain
    • 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;

  • 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

  • Caddy supports Let's Encrypt directly.
  • leproxy small and nice (stand alone) https reverse proxy with automatic Letsencrypt
  • bunch of others

About

Nginx with automatic let's encrypt (docker image)

License:Apache License 2.0


Languages

Language:Nginx 56.4%Language:Shell 43.6%