GithubHelp home page GithubHelp logo

zrod / traefik-certdumper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from svendowideit/traefik-certdumper

0.0 0.0 0.0 8 KB

dump the Lets Encrypt certs that Traefik stores in acme.json - to .crt, .key and .pem

License: MIT License

Dockerfile 7.33% Shell 92.67%

traefik-certdumper's Introduction

traefik-certdumper

Dump the Lets Encrypt certs that Traefik stores in acme.json or in Consul - to .crt, .key and .pem.

Pretty much to solve traefik/traefik#2418 using @flesser's compose-file script and https://github.com/containous/traefik/blob/master/contrib/scripts/dumpcerts.sh with a few little mods.

Default mode: acme.json

This is the default mode. In this case, you just have to mount acme.json on /traefik/acme.json. The certs will be dumped to /traefik/ssl.

Here is a Docker Swarm stack configuration example:

  # Watch acme.json and dump certificates to files
  # https://github.com/containous/traefik/issues/2418#issuecomment-369225856
  certdumper:
    image: svendowideit/traefik-certdumper:latest
    volumes:
      - traefikdata:/traefik
    deploy:
      mode: replicated
      replicas: 1

Consul mode

When you run multiple Traefik instances, it usually uses a KV store to store Lets Encrypt certs, instead of acme.json. Consul is currently the recommanded KV store.

To enable this mode, you have to:

  • set the environment variable CERTDUMPER_MODE to consul
  • set the environment variable CONSUL_HTTP_ADDR (host:port)
  • override the environment variable CERTDUMPER_CONSUL_PREFIX if needed (defaults to traefik)

Here is a Docker Swarm stack configuration example:

  # Watch acme configuration from Consul and dump certificates to files
  certdumper:
    image: svendowideit/traefik-certdumper:latest
    environment:
      - CERTDUMPER_MODE=consul
      - CERTDUMPER_CONSUL_ADDR=traefik_consul:8500
    volumes:
      - traefikcerts:/traefik/ssl
    networks:
      - traefik
    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: on-failure
        delay: 60s

traefik-certdumper's People

Contributors

svendowideit 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.