Add dependencies between netbird and traefik containers
When setting the explicit ip of the traefik container in the webproxy network, this resolves the ip of the traefik container changing between restarts.
This commit is contained in:
parent
f7c4620378
commit
81f4554dd7
2 changed files with 7 additions and 2 deletions
|
|
@ -80,6 +80,9 @@ in {
|
|||
"traefik.http.routers.netbird-dashboard.priority" = "1";
|
||||
"traefik.http.services.dashboard.loadbalancer.server.port" = "80";
|
||||
};
|
||||
dependsOn = [
|
||||
"netbird-server"
|
||||
];
|
||||
};
|
||||
netbird-server = {
|
||||
image = "netbirdio/netbird-server:${serverVersion}";
|
||||
|
|
@ -155,6 +158,9 @@ in {
|
|||
"traefik.http.services.netbird-server-h2c.loadbalancer.server.port" = "80";
|
||||
"traefik.http.services.netbird-server-h2c.loadbalancer.server.scheme" = "h2c";
|
||||
};
|
||||
dependsOn = [
|
||||
"traefik"
|
||||
];
|
||||
};
|
||||
netbird-proxy = {
|
||||
image = "netbirdio/reverse-proxy:${serverVersion}";
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ in {
|
|||
];
|
||||
extraOptions = [
|
||||
''--mount=type=volume,source=certs,target=/certs,volume-driver=local''
|
||||
"--ip=172.18.0.2"
|
||||
"--add-host=host.docker.internal:host-gateway"
|
||||
"--health-cmd=wget --spider --quiet http://localhost:8080/ping"
|
||||
"--health-interval=10s"
|
||||
|
|
@ -130,7 +131,5 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
networking.firewall.extraCommands = "iptables -t nat -I PREROUTING -s 172.18.0.0/16 -d 172.18.0.0/16 -j MASQUERADE";
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue