mirror of
https://github.com/tale/headplane.git
synced 2026-07-26 07:48:14 +00:00
fix: auto read dns.extra_records_path instead of making it required
Closes HP-538
This commit is contained in:
@@ -251,7 +251,7 @@ export async function loadHeadscaleConfig(path?: string, strict = true, dnsPath?
|
||||
return new HeadscaleConfig("no");
|
||||
}
|
||||
|
||||
const dns = await loadHeadscaleDNS(dnsPath);
|
||||
const dns = await loadHeadscaleDNS(dnsPath ?? config.dns.extra_records_path);
|
||||
if (dns && !config.dns.extra_records_path) {
|
||||
log.error(
|
||||
"config",
|
||||
|
||||
+4
-4
@@ -101,11 +101,11 @@ headscale:
|
||||
config_strict: true
|
||||
|
||||
# If you are using `dns.extra_records_path` in your Headscale
|
||||
# configuration, you need to set this to the path for Headplane
|
||||
# to be able to read the DNS records.
|
||||
# configuration, Headplane will read that path automatically. Set
|
||||
# this only when Headplane needs to access the same file at a
|
||||
# different path, such as in Docker bind mounts.
|
||||
#
|
||||
# Pass it in if using Docker and ensure that the file is both
|
||||
# readable and writable to the Headplane process.
|
||||
# Ensure that the file is both readable and writable to the Headplane process.
|
||||
# When using this, Headplane will no longer need to automatically
|
||||
# restart Headscale for DNS record changes.
|
||||
# dns_records_path: "/var/lib/headscale/extra_records.json"
|
||||
|
||||
@@ -83,7 +83,7 @@ _Default:_ `true`
|
||||
|
||||
## settings.headscale.dns_records_path
|
||||
|
||||
_Description:_ If you are using `dns.extra_records_path` in your Headscale configuration, you need to set this to the path for Headplane to be able to read the DNS records.
|
||||
_Description:_ If you are using `dns.extra_records_path` in your Headscale configuration, Headplane reads that path automatically. Set this only when Headplane needs to access the same file at a different path.
|
||||
Ensure that the file is both readable and writable by the Headplane process.
|
||||
When using this, Headplane will no longer need to automatically restart Headscale for DNS record changes.
|
||||
|
||||
|
||||
@@ -123,10 +123,10 @@ services:
|
||||
# Headplane config.yaml file.
|
||||
- "/path/to/headscale/config.yaml:/etc/headscale/config.yaml"
|
||||
|
||||
# If you are using dns.extra_records in Headscale (recommended), you
|
||||
# should also mount that file here so Headplane can read and write it.
|
||||
# Ensure that the path matches `headscale.dns_records_path` in your
|
||||
# Headplane config.yaml file.
|
||||
# If you are using dns.extra_records_path in Headscale (recommended),
|
||||
# also mount that file here so Headplane can read and write it. If the
|
||||
# in-container path differs from Headscale's dns.extra_records_path,
|
||||
# set `headscale.dns_records_path` in your Headplane config.yaml file.
|
||||
- "/path/to/headscale/dns_records.json:/etc/headscale/dns_records.json"
|
||||
|
||||
# Read-only access to the Docker socket (or a proxy)
|
||||
|
||||
Reference in New Issue
Block a user