Git Product home page Git Product logo

docker-nginx-letsencrypt-proxy's Introduction

Docker Nginx Proxy with Let's Encrypt

Docker Nginx Proxy with Let's Encrypt simplifies application integration with Let's Encrypt.

This project provides a simple nginx configuration and auto-updating Let's Encrypt for integration with existing services.

Docker Hub image: docker-nginx-letsencrypt-proxy

  • Pulls: Docker Hub Pulls
  • Stars: Docker Hub Stars
  • Release: GitHub Release Version
  • Open Issues: GitHub Open Issues

Configuration:

The following docker environment variables are required for proper usage:

  • LE_EMAIL, the email address for use with Let's Encrypt (simply registers your public key for retrieval).
  • LE_DOMAIN, a comma separated list of domains current configured to point at your server
  • PROXY_DEST, a comma separated list of destinations for the proxied services; along the lines of http://mydestination.com or http://localhost:8000. There should be as many destinations as LE_DOMAINs; however, for each without a corresponding destination, the first destination will be used for the remaining LE_DOMAINs.
  • SLACK_NOTIFICATIONS_INFRA_URL (optional), the slack webhook integration URL to receive slack notifications upon certificate update or letsencrypt-auto error.
  • LE_ENABLED (optional, defaults to true), For local, non-public development stacks, set to false. This will disable requests to Let's Encrypt for certificates and use self signed certificates instead.
  • LE_TEST (optional), LE is rate limited. While testing your stack, be sure to set testing mode so requests don't count against your domain quota. Such certificates will not be valid, but are sufficient to test your setup.
  • TLS_SETTING (optional), one of MODERN, INTERMEDIATE, OR OLD. All other values will be igored. MODERN is default to allow for the best security setting.
Configuration Oldest compatible client
MODERN Firefox 27, Chrome 30, IE 11 on Windows 7, Edge, Opera 17, Safari 9, Android 5.0, Java 8
INTERMEDIATE Firefox 1, Chrome 1, IE 7, Opera 5, Safari 1, Windows XP IE8, Android 2.3, Java 7
OLD Windows XP IE6, Java 6

When certificates are updated, the event handler will:

  • Move the resulting certificates to /etc/nginx/ssl
  • Tell supervisor to restart nginx: supervisorctl restart nginx
  • If SLACK_NOTIFICATIONS_INFRA_URL is set, send a notification to your slack channel.

The premise is simple:

  • The image is configured to request a Let's Encrypt certificate for each of the (comma separated) domains listed in the LE_DOMAIN env variable provided in docker-compose.yml
    • Since Let's Encrypt is rate limited, an env variable of LE_TEST=true can be provided during testing (in docker-compose.yml).
  • supervisor handles the running of nginx and the letsencrypt event handler, which is run every hour.
  • If the hourly Let's Encrypt script yields an updated certificate, files are copied and nginx is restarted using the supervisor control call.
    • Provide a SLACK_NOTIFICATIONS_INFRA_URL in the docker-compose.yml to get a Slack notification of a certificate update!

docker-nginx-letsencrypt-proxy's People

Contributors

cfairweather avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.