WIP: add cron job to download extra dns json file #5
Reference in New Issue
Block a user
No description provided.
Delete Branch "dns_extra_records"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently testing this, if someone interested in helping with test and/or review that would be appreciated
Awesome, thank you @ammaratef45 ! 🙏If you've tested a non-
compose.dns.ymldeployment and it works, I say go ahead and merge. Otherwise I will try to test it myself ASAP.@ -0,0 +12,4 @@mode: replicatedreplicas: 0labels:- "swarm.cronjob.enable=true"Love it! For a million bonus points, it might be nice to add a fallback built-in cron option for folks who don't have / don't want a
swarm-cronjobapp? Highly optional though IMO.good idea, will look into this
@ammaratef45
backup-bot-twois the only example I can think of that supports both:Independent: https://git.coopcloud.tech/coop-cloud/backup-bot-two/src/branch/main/entrypoint.sh
swarm-cronjob: https://git.coopcloud.tech/coop-cloud/backup-bot-two/src/branch/main/compose.swarm-cronjob.yml@ -319,3 +319,3 @@# Alternatively, extra DNS records can be loaded from a JSON file.# Headscale processes this file on each change.# extra_records_path: /var/lib/headscale/extra-records.jsonextra_records_path: /var/lib/headscale/extra-records.jsonWill this cause any problems for deployments not using
compose.dns.yml? I wonder about putting this inside an{{ if?No because I was a smart cookie and tested this and ended up putting
extra_dns_recordsconfig in the main compose file@ -0,0 +1,6 @@apk add --no-cache --quiet wgetCould also inline this whole file as the
entrypoint, given it's so short? No big deal either way though.hmm using the | operator you mean? that is smart and would save us needing to handle a config version!
@ -0,0 +1 @@[]Could cheekily inline this into
compose.dns.ymlmaybe? https://stackoverflow.com/a/77561067/14269772yes will do that!
I did test that and it works but I just want to improve on this PR a bit more and take your suggestions!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.