forked from Deuxfleurs/nixcfg
use diplonat autodiscovery to set ip addr
This commit is contained in:
parent
602c003e1e
commit
3e0df95fe9
1 changed files with 8 additions and 5 deletions
|
@ -222,11 +222,14 @@ EOF
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
env {
|
template {
|
||||||
# Our container can autodetect the public IP with the ifconfig.me service
|
data = <<EOH
|
||||||
# However we would like to avoid relying on a 3rd party service for production use
|
{{ with $a := env "attr.unique.hostname" | printf "diplonat/autodiscovery/ipv4/%s" | key | parseJSON }}
|
||||||
# That's why I am setting the public IP address statically here VVVV
|
JITSI_NAT_PUBLIC_IP = {{ $a.address }}
|
||||||
JITSI_NAT_PUBLIC_IP = "${meta.public_ipv4}"
|
{{ end }}
|
||||||
|
EOH
|
||||||
|
destination = "secrets/jitsi-videobridge.env"
|
||||||
|
env = true
|
||||||
}
|
}
|
||||||
|
|
||||||
template {
|
template {
|
||||||
|
|
Loading…
Reference in a new issue