Giter Site home page Giter Site logo

Comments (5)

abate avatar abate commented on May 21, 2024 1

yes indeed. for the first one is not necessary : for the second one I need a different file name.

from traefik-certs-dumper.

ldez avatar ldez commented on May 21, 2024

Thanks 😸 !

I added a Dockerfile inside the project and the images are available here: https://hub.docker.com/r/ldez/traefik-certs-dumper

from traefik-certs-dumper.

abate avatar abate commented on May 21, 2024

this is great ! This is a small script to create certificates to be used with tvial/docker-mailserver I just tested.

I love when a plan comes together

#!/bin/sh

/usr/bin/traefik-certs-dumper dump \
        --domain-subdir=true \
        --source /acme.json \
        --dest /dump/live

for f in in $(find /dump -name certificate.crt); do
        cd $(dirname $f)
        ln -s certificate.crt fullchain.pem
        ln -s privatekey.key privkey.pem
        cd -
done

Dockerfile :

FROM ldez/traefik-certs-dumper

COPY dump.sh /
RUN chmod +x /dump.sh

ENTRYPOINT [ "/dump.sh"]

and the associated docker-compose.yml

volumes:
  - certs:

services:
  certdump:
    build: .
    volumes:
      - ./acme.json:/acme.json:ro
      - certs:/dump
    restart: "no"

the certs volume can be mount as /etc/letsencrypt/live

from traefik-certs-dumper.

ldez avatar ldez commented on May 21, 2024

@abate I see that you change the extension.

for f in in $(find /dump -name certificate.crt); do
        cd $(dirname $f)
        ln -s certificate.crt fullchain.pem
        ln -s privatekey.key privkey.pem
        cd -

Have you try this:

$ traefik-certs-dumper dump --domain-subdir=true --dest /dump/live --crt-ext=.pem --key-ext=.pem
dump
├──my.domain.com
│  ├──certificate.pem
│  └──privatekey.pem
└──private
   └──letsencrypt.key

from traefik-certs-dumper.

ldez avatar ldez commented on May 21, 2024

@abate I added an option to change the names (v1.5.0)

$ traefik-certs-dumper dump --dest /dump/live --domain-subdir=true --crt-name=fullchain --key-name=privkey -crt-ext=.pem --key-ext=.pem 
live
├──my.domain.com
│  ├──fullchain.pem
│  └──privkey.pem
└──private
   └──letsencrypt.key

from traefik-certs-dumper.

Related Issues (20)

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.