Giter Club home page Giter Club logo

nginx-proxy-letsencrypt-swarm's Introduction

nginx-proxy-letsencrypt-swarm

nginx-proxy-letsencrypt-swarm sets up a container running nginx, comsave/docker-gen and comsave/docker-swarm-watcher. docker-gen generates reverse proxy configs for nginx and reloads nginx when containers are started and stopped. docker-swarm-watcher listens to all management nodes in a swarm an captures there events and acts accordingly. Ssl certificates are automatically generated, stored and renewed in an s3 compatible file storage. This ensures after node failure the container will rebuild with all it's persisted certificates.

This project only runs in a swarm on manager nodes.

Usage:

Initialize a swarm.

$ docker swarm init

To enable high availability it is advisable to add multiple swarm managers and load balance across them. To promote a swarm node to a swarm manager run the following command on the manager.

$ docker swarm join-token manager

Docker compose v3

version: '3.6'

services:
  nginx-proxy:
    image: joeriv/nginx-proxy-letsencrypt-swarm
    ports:
      - "80:80"
      - "443:443"
    environment:
      - S3FS_ENDPOINT=https://s3.amazonaws.com
      - S3FS_ACCESSKEY=<ACCESSKEY>
      - S3FS_SECRETKEY=<SECRETKEY>
      - S3FS_BUCKET=<BUCKETNAME>
      - LETSENCRYPT_EMAIL=<LETSENCRYPTEMAIL>
    deploy:
        placement:
          constraints: [node.role == manager]
    volumes:
      - "/var/run/docker.sock:/tmp/docker.sock:ro"

# docker stack deploy --compose-file=nginx-proxy.yml nginx-proxy

nginx-proxy-letsencrypt-swarm's People

Contributors

gyvastis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nginx-proxy-letsencrypt-swarm's Issues

Support running on worker nodes

It would be great if this also supported running on worker nodes.
In my project I will load balance around 30 nginx instances with round-robin dns. I need the combined total bandwidth of all the nodes, and 30 manager nodes is not ideal.

Could you lay of the potensial problems with making this project support worker nodes as well? Essensially the listening mechanism needs to change right?

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.