Simple nginx image (alpine based) with integrated Let's Encrypt support.
-
get docker-compose.yml and change things
- set timezone to your local, for example
TZ=UTC. For more timezone values check/usr/share/zoneinfodirectory - set
LETSENCRYPT=trueif you want automatic certificate install and renewal LE_EMAILshould be your email andLE_FQDNfor domain- for multiple FQDNs you can pass comma-separated list, like
LE_FQDN=aaa.example.com,bbb.example.com - alternatively set
LETSENCRYPTtofalseand pass your own cert and key inSSL_CERTandSSL_KEY
- set timezone to your local, for example
-
use provided
etc/service-example.confto make your ownetc/service.conf. Keep bothssl_certificate SSL_CERT;andssl_certificate_key SSL_KEY; -
make sure
volumesin 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 buildwill do it -
start it
docker-compose up
- image uses alpine's
certbotpackage. script/entrypoint.shrequests LE certificate and will refresh every 60 days.script/le.shgets SSL- nginx-le on docker-hub
- Træfik HTTP reverse proxy and load balancer. Supports Let's Encrypt directly.
- Caddy supports Let's Encrypt directly.
- leproxy small and nice (stand alone) https reverse proxy with automatic Letsencrypt
- bunch of others