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

Change clean behaviour #135

Open
fkrauthan opened this issue Jan 1, 2021 · 4 comments
Open

Change clean behaviour #135

fkrauthan opened this issue Jan 1, 2021 · 4 comments

Comments

@fkrauthan
Copy link

I was wondering if you would consider doing the cleanup AFTER the certificates are issues and only delete folders/files that did not renew?

My problem right now is that I use the --domain-subdir and --watch flag and mount a domain output folder to a docker container. However when the cert dumper runs it deletes all folders first and then creates them which screws with dockers folder mount and empties out the mounted cert folder within the running docker container.

Please let me know if you want to know more about my usecase.

@ldez
Copy link
Owner

ldez commented Jan 1, 2021

@fkrauthan
Copy link
Author

fkrauthan commented Jan 2, 2021

@ldez No I am talking exactly about changing the behaviour of clean (as that is turned on by default anyways) or adding an additional clean mode.

Currently
With the --clean and --domain-subdir flags turned on

  1. It deletes all folders and files inside the certificate directory
  2. It recreates new folders and certificate files for each entry in acme.json

Expected
With the --clean and --domain-subdir flags turned on

  1. Overwrite existing files with the new data from acme.json potentially creating new folders as well
  2. Delete all old files/folders that are no longer listed in acme.json

Why
This way if you mount an individual domain folder that still exists the folder mount still exists and docker is not getting confused because the mounted folder all the sudden disappears for a bit.

@ldez
Copy link
Owner

ldez commented Jan 2, 2021

You can use --clean=false and the post hook.

@fkrauthan
Copy link
Author

Yeah but then I would have to reimplement parsing the acme.json which I kinda don't wanna do. Because then I could just write my own cert dump at that time. This is not a bug report but a feature request/suggestion to make this more helpful. Currently I don't have any cleaning turned on as I don't expect many of my domains to be shutdown anytime soon. But this could be helpful for me (and others probably as well) in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants