semi-spread example: serve internal vhosts on the VPN addresses only, over IPv4 and IPv6
This commit is contained in:
parent
538da5a13a
commit
7800f92425
1 changed files with 356 additions and 89 deletions
20
docs/examples/semi-spread/gateway.nix
Normal file
20
docs/examples/semi-spread/gateway.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Which addresses the gateway's private vhosts answer on: this machine's VPN
|
||||
# addresses (IPv4 and IPv6) and the hive bridge. Identical on every host.
|
||||
# Each machine's own file lists its private vhosts (`public = false`); a vhost
|
||||
# that stays `public` also answers on these addresses.
|
||||
#
|
||||
# The bridge is how this machine's own containers (agents, swarm services)
|
||||
# reach a name it serves: the hive's resolver answers it with the bridge
|
||||
# address.
|
||||
{ config, ... }:
|
||||
let
|
||||
mesh = import ./mesh.nix;
|
||||
me = mesh.${config.networking.hostName};
|
||||
in
|
||||
{
|
||||
services.hyperhive.gateway.privateListenAddresses = [
|
||||
me.address
|
||||
me.address6
|
||||
config.services.hyperhive.network.bridgeIp
|
||||
];
|
||||
}
|
||||
Loading…
Reference in a new issue