diff --git a/modules/swarm/jitsi/jitsi_jvb.tf b/modules/swarm/jitsi/jitsi_jvb.tf index d119f0d..16e908a 100644 --- a/modules/swarm/jitsi/jitsi_jvb.tf +++ b/modules/swarm/jitsi/jitsi_jvb.tf @@ -2,12 +2,26 @@ data "docker_registry_image" "jitsi_jvb" { name = "jitsi/jvb:stable" } +locals { + labels_jvb = { + "shepherd.auto-update" = "true", + "traefik.enable" = "true" + "traefik.http.services.jitsi-jvb.loadbalancer.server.port" = "9090", + "traefik.http.routers.jitsi-jvb.rule" = "Host(`talk.chaoswest.tv`)&&PathPrefix(`/colibri-ws`)", + "traefik.http.routers.jitsi-jvb.tls" = "true", + "traefik.http.routers.jitsi-jvb.tls.certresolver" = "default", + } +} + resource "docker_service" "jitsi_jvb" { name = "jitsi_jvb" - labels { - label = "shepherd.auto-update" - value = "true" + dynamic "labels" { + for_each = local.labels_jvb + content { + label = labels.key + value = labels.value + } } endpoint_spec { @@ -27,6 +41,10 @@ resource "docker_service" "jitsi_jvb" { } task_spec { + networks_advanced { + name = data.docker_network.traefik.id + } + networks_advanced { name = docker_network.jitsi.id } @@ -43,12 +61,13 @@ resource "docker_service" "jitsi_jvb" { JVB_TCP_HARVESTER_DISABLED = "true" JVB_TCP_PORT = "4443" JVB_TCP_MAPPED_PORT = "4443" - JVB_STUN_SERVERS = "meet-jit-si-turnrelay.jitsi.net:443" PUBLIC_URL = "https://talk.chaoswest.tv" TZ = "Europe/Berlin" XMPP_AUTH_DOMAIN = "auth.meet.jitsi" XMPP_INTERNAL_MUC_DOMAIN = "internal-muc.meet.jitsi" XMPP_SERVER = "jitsi_prosody" + JVB_WS_SERVER_ID = "jitsi_jvb" + JVB_DISABLE_STUN = "1" } } } diff --git a/modules/swarm/jitsi/jitsi_prosody.tf b/modules/swarm/jitsi/jitsi_prosody.tf index 7b1f522..bb77574 100644 --- a/modules/swarm/jitsi/jitsi_prosody.tf +++ b/modules/swarm/jitsi/jitsi_prosody.tf @@ -7,7 +7,7 @@ locals { "shepherd.auto-update" = "true", "traefik.enable" = "true" "traefik.http.services.jitsi-prosody.loadbalancer.server.port" = "5280", - "traefik.http.routers.jitsi-prosody.rule" = "Host(`talk.chaoswest.tv`)&&Path(`/room-census`)", + "traefik.http.routers.jitsi-prosody.rule" = "Host(`talk.chaoswest.tv`)&&(Path(`/room-census`)||Path(`/xmpp-websocket`))", "traefik.http.routers.jitsi-prosody.tls" = "true", "traefik.http.routers.jitsi-prosody.tls.certresolver" = "default", } diff --git a/modules/swarm/jitsi/jitsi_web.tf b/modules/swarm/jitsi/jitsi_web.tf index 81c4eb8..f4dbf85 100644 --- a/modules/swarm/jitsi/jitsi_web.tf +++ b/modules/swarm/jitsi/jitsi_web.tf @@ -7,7 +7,7 @@ locals { "shepherd.auto-update" = "true", "traefik.enable" = "true" "traefik.http.services.jitsi-web.loadbalancer.server.port" = "80", - "traefik.http.routers.jitsi-web.rule" = "Host(`talk.chaoswest.tv`)&&!Path(`/room-census`)", + "traefik.http.routers.jitsi-web.rule" = "Host(`talk.chaoswest.tv`)&&!(Path(`/room-census`)||Path(`/xmpp-websocket`)||PathPrefix(`/colibri-ws`))", "traefik.http.routers.jitsi-web.tls" = "true", "traefik.http.routers.jitsi-web.tls.certresolver" = "default", }