Just wanted to ask and see if this sounds like a good way to use Caddy.
I’m trying to automate the serving of custom domain’s https to users.
The current implementation of Caddy goes as follows:
We have caddy running on the main app (and that works correctly)
Now, the idea is that users will be able to submit a custom domain and the app serves specific content to this domain, and so to do this we ask the user create A records in the user’s custom domain to point www and non www to the server’s ip and then once these changes have propagated then we add the domain to our Caddy.config file and restart caddy. (this is also kind of working)
The problem is that this all seems a little too brittle - like if the new Caddy.config fails for whatever reason then nothing starts working.
Our current solution to that ^ is to have jobs to retry and some cron tasks to run daily and check all the custom domains and the Caddy.config are playing nicely.
Thanks for your time, let me know if you have any suggestions!