Add option for docker subnet for netbird webproxy network
The same subnet on different routing peers makes problems for the reverse proxy feature. Therefore add the possibility to set a different subnet on different hosts.
This commit is contained in:
parent
b6e7e0a7dc
commit
3a0fe99688
1 changed files with 6 additions and 1 deletions
|
|
@ -37,6 +37,11 @@ in {
|
|||
description = "Configuration for docker connection";
|
||||
type = clientConfiguration;
|
||||
};
|
||||
dockerSubnet = lib.mkOption {
|
||||
description = "Second part of ipv4 subnet";
|
||||
type = lib.types.str;
|
||||
default = "20";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
@ -94,7 +99,7 @@ in {
|
|||
Type = "oneshot";
|
||||
};
|
||||
script = ''
|
||||
docker network inspect webproxy || docker network create webproxy --ipv4 --ipv6 --subnet=172.20.0.0/16 --gateway=172.20.0.1
|
||||
docker network inspect webproxy || docker network create webproxy --ipv4 --ipv6 --subnet=172.${cfg.dockerSubnet}.0.0/16 --gateway=172.${cfg.dockerSubnet}.0.1
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue