mirror of
https://github.com/tale/headplane.git
synced 2026-08-27 23:47:31 +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");
|
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) {
|
if (dns && !config.dns.extra_records_path) {
|
||||||
log.error(
|
log.error(
|
||||||
"config",
|
"config",
|
||||||
|
|||||||
+4
-4
@@ -101,11 +101,11 @@ headscale:
|
|||||||
config_strict: true
|
config_strict: true
|
||||||
|
|
||||||
# If you are using `dns.extra_records_path` in your Headscale
|
# If you are using `dns.extra_records_path` in your Headscale
|
||||||
# configuration, you need to set this to the path for Headplane
|
# configuration, Headplane will read that path automatically. Set
|
||||||
# to be able to read the DNS records.
|
# 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
|
# Ensure that the file is both readable and writable to the Headplane process.
|
||||||
# readable and writable to the Headplane process.
|
|
||||||
# When using this, Headplane will no longer need to automatically
|
# When using this, Headplane will no longer need to automatically
|
||||||
# restart Headscale for DNS record changes.
|
# restart Headscale for DNS record changes.
|
||||||
# dns_records_path: "/var/lib/headscale/extra_records.json"
|
# dns_records_path: "/var/lib/headscale/extra_records.json"
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ _Default:_ `true`
|
|||||||
|
|
||||||
## settings.headscale.dns_records_path
|
## 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.
|
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.
|
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.
|
# Headplane config.yaml file.
|
||||||
- "/path/to/headscale/config.yaml:/etc/headscale/config.yaml"
|
- "/path/to/headscale/config.yaml:/etc/headscale/config.yaml"
|
||||||
|
|
||||||
# If you are using dns.extra_records in Headscale (recommended), you
|
# If you are using dns.extra_records_path in Headscale (recommended),
|
||||||
# should also mount that file here so Headplane can read and write it.
|
# also mount that file here so Headplane can read and write it. If the
|
||||||
# Ensure that the path matches `headscale.dns_records_path` in your
|
# in-container path differs from Headscale's dns.extra_records_path,
|
||||||
# Headplane config.yaml file.
|
# set `headscale.dns_records_path` in your Headplane config.yaml file.
|
||||||
- "/path/to/headscale/dns_records.json:/etc/headscale/dns_records.json"
|
- "/path/to/headscale/dns_records.json:/etc/headscale/dns_records.json"
|
||||||
|
|
||||||
# Read-only access to the Docker socket (or a proxy)
|
# Read-only access to the Docker socket (or a proxy)
|
||||||
|
|||||||
Reference in New Issue
Block a user