aboutsummaryrefslogtreecommitdiff
path: root/cluster/prod/app
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-05-18 15:45:00 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-05-18 15:45:00 +0200
commit3e0df95fe90b3cd367e6420b7eb6efed78cea7e0 (patch)
treecf851ccba420d5f632134659ce1bcd793317f279 /cluster/prod/app
parent602c003e1e381665a28d0c679e9d33c0085b9074 (diff)
downloadnixcfg-3e0df95fe90b3cd367e6420b7eb6efed78cea7e0.tar.gz
nixcfg-3e0df95fe90b3cd367e6420b7eb6efed78cea7e0.zip
use diplonat autodiscovery to set ip addr
Diffstat (limited to 'cluster/prod/app')
-rw-r--r--cluster/prod/app/jitsi/deploy/jitsi.hcl13
1 files changed, 8 insertions, 5 deletions
diff --git a/cluster/prod/app/jitsi/deploy/jitsi.hcl b/cluster/prod/app/jitsi/deploy/jitsi.hcl
index eb505a0..66fec76 100644
--- a/cluster/prod/app/jitsi/deploy/jitsi.hcl
+++ b/cluster/prod/app/jitsi/deploy/jitsi.hcl
@@ -222,11 +222,14 @@ EOF
]
}
- env {
- # Our container can autodetect the public IP with the ifconfig.me service
- # However we would like to avoid relying on a 3rd party service for production use
- # That's why I am setting the public IP address statically here VVVV
- JITSI_NAT_PUBLIC_IP = "${meta.public_ipv4}"
+ template {
+ data = <<EOH
+ {{ with $a := env "attr.unique.hostname" | printf "diplonat/autodiscovery/ipv4/%s" | key | parseJSON }}
+ JITSI_NAT_PUBLIC_IP = {{ $a.address }}
+ {{ end }}
+ EOH
+ destination = "secrets/jitsi-videobridge.env"
+ env = true
}
template {