traefik-certs-dumper icon indicating copy to clipboard operation
traefik-certs-dumper copied to clipboard

make domain name as crt-name and key-name

Open woobenjamin opened this issue 2 years ago • 5 comments

Hi there,

This is the perfect solution for what I'm looking for. I'm wondering if I could suggest the opportunity to name the crt and key name files as the domain name, i.e. example.com.crt and example.com.key.

Thanks again for creating this!

ben

woobenjamin avatar Oct 27 '22 15:10 woobenjamin

Hi,

the domain is already used to name files:

https://github.com/ldez/traefik-certs-dumper#examples

ldez avatar Oct 27 '22 16:10 ldez

I think I might be doing something wrong, or going cross-eyed... I took away the --crt-name and --key-name, and diid the following

      && traefik-certs-dumper file --version v2 --watch
      --source /data/acme.json --dest /data/certs
      --crt-ext=.crt --key-ext=.key 
      --domain-subdir=true'

and

      && traefik-certs-dumper file --version v2 --watch
      --source /data/acme.json --dest /data/certs
      --domain-subdir=true'

in both situations, the directories were correct, but the files generated were named certificate.crt and privatekey.crt

What I was thinking was like this:

dump
├──my.domain.com
│  ├──my.domain.com.crt
│  └──my.domain.com.key
└──private
   └──letsencrypt.key

Many thanks!

woobenjamin avatar Oct 27 '22 17:10 woobenjamin

It's because you are using --domain-subdir=true

ldez avatar Oct 27 '22 17:10 ldez

@ldez,

I'm sorry, I feel like I'm not expressing what I want clearly. I do want the domain-subdir, but I also want the crt and key files to be named as the domain as well.

So, I want the directory structure as domain1.com, domain2.com, etc. But I also want the files within the directory tree to be named domain1.com.crt and domain1.key.

One way of representing it might be: /data/domain1.com which has 2 files domain1.com.crt and domain1.com.key /data/domain2.com which has 2 files domain2.com.crt and domain2.com.key etc.

ben

woobenjamin avatar Oct 27 '22 21:10 woobenjamin

+1 Any news on this?

zgqq avatar Jun 10 '23 04:06 zgqq