Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple ACME Files #151

Open
w4tzmann opened this issue Jun 7, 2023 · 3 comments
Open

Multiple ACME Files #151

w4tzmann opened this issue Jun 7, 2023 · 3 comments
Labels
good first issue Good for newcomers. type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Comments

@w4tzmann
Copy link

w4tzmann commented Jun 7, 2023

As far as I can see, at the moment only one acme file is supported.
But my Traefik setup has multiple acme files (different DNS challanges by different domain provider).
Is there any better workaround/ soluton, then starting multiple instances?

Thanks in advance!

Regards,

Basti

@w4tzmann
Copy link
Author

w4tzmann commented Jun 7, 2023

Quick dirty workaround:
changing the following lines seems to work:
dump.sh
line 7: acme_file_path=$(echo $acme_file_path | cut -d " " -f 1)
new line 7: ACME_FILE_PATH=${ACME_FILE_PATH:-/traefik/acme.json}

line 437: dump
new line 437:

for i in $(echo $ACME_FILE_PATH | tr " "); 
    do 
      acme_file_path=$i
      dump    
    done

line 439...:

while true; do
  if [[ -f ${acme_file_path} ]]; then
    inotifywait -qq -e modify "${acme_file_path}"  
    if [[ $? -eq 0 ]]; then
      dump
    fi

new 439..:

while true; do
  if ls ${ACME_FILE_PATH} > /dev/null 2>&1; then
    acme_file_path=$(inotifywait -q -e modify  $ACME_FILE_PATH)
    if [[ $? -eq 0 ]]; then
      acme_file_path=$(echo $acme_file_path | cut -d " " -f 1)
      dump
    fi

Tested with:
ACME_FILE_PATH=/traefik/*.json
ACME_FILE_PATH=""
ACME_FILE_PATH="/traefik/acme.json /traefik/acme2.json"

After starting the script, I get the following message:

2023/06/07 18:35:14 root.go:45: v2: dump failed: failed to unmarshal file "": read .: is a directory

After changing one of the ACME_FILES I get the correct outputs.

@kereis
Copy link
Owner

kereis commented Jun 20, 2023

Hi,

I think the current way of handling multiple domains is to just run the container for each domain separately. Feel free to suggest an PR containing the feature for handling multiple domains.

Cheers

@kereis kereis added type: feature Brand new functionality, features, pages, workflows, endpoints, etc. good first issue Good for newcomers. labels Jun 20, 2023
@seisdr
Copy link

seisdr commented Mar 30, 2024

certdumper-1 | [2024-03-30T07:28:48+0000]: /traefik/acme.json is not a file. Retrying...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers. type: feature Brand new functionality, features, pages, workflows, endpoints, etc.
Projects
None yet
Development

No branches or pull requests

3 participants