From d8d0d74920d05045e2b0a20092d595797a42aef3 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 28 Oct 2020 14:12:15 +0100 Subject: rework jitsi service --- app/deployment/jitsi.hcl | 89 +++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 54 deletions(-) diff --git a/app/deployment/jitsi.hcl b/app/deployment/jitsi.hcl index c1bee73..6625668 100644 --- a/app/deployment/jitsi.hcl +++ b/app/deployment/jitsi.hcl @@ -13,11 +13,6 @@ job "jitsi" { config { image = "superboum/amd64_jitsi_xmpp:v4" network_mode = "host" - port_map { - xmpp_port = 5222 - ext_port = 5347 - bosh_port = 5280 - } } template { @@ -50,29 +45,17 @@ job "jitsi" { resources { cpu = 300 memory = 200 - network { - port "xmpp_port" { - static = "5222" - } - port "ext_port" { - static = "5347" - } - port "bosh_port" { - static = "5280" - } - } } service { - tags = [ - "jitsi" - ] - port = "bosh_port" - address_mode = "host" + tags = [ "jitsi", "bosh" ] + port = 5280 + address_mode = "driver" name = "jitsi-xmpp-bosh" check { type = "tcp" - port = "bosh_port" + address_mode = "driver" + port = 5280 interval = "60s" timeout = "5s" check_restart { @@ -82,6 +65,20 @@ job "jitsi" { } } } + + service { + tags = [ "jitsi", "ext" ] + port = 5347 + address_mode = "driver" + name = "jitsi-ext" + } + + service { + tags = [ "jitsi", "xmpp" ] + port = 5222 + address_mode = "driver" + name = "jitsi-xmpp" + } } task "front" { @@ -89,9 +86,6 @@ job "jitsi" { config { image = "superboum/amd64_jitsi_meet:v1" network_mode = "host" - port_map { - https_port = 443 - } } template { @@ -116,11 +110,6 @@ job "jitsi" { resources { cpu = 300 memory = 200 - network { - port "https_port" { - static = "443" - } - } } service { @@ -131,12 +120,13 @@ job "jitsi" { "traefik.frontend.rule=Host:jitsi.deuxfleurs.fr;PathPrefix:/", "traefik.protocol=https" ] - port = "https_port" - address_mode = "host" + port = 443 + address_mode = "driver" name = "jitsi-front-https" check { type = "tcp" - port = "https_port" + port = 443 + address_mode = "driver" interval = "60s" timeout = "5s" check_restart { @@ -185,10 +175,6 @@ job "jitsi" { config { image = "superboum/amd64_jitsi_videobridge:v15" network_mode = "host" - port_map { - video1_port = 8080 - video2_port = 10000 - } ulimit { nofile = "1048576:1048576" nproc = "65536:65536" @@ -214,28 +200,17 @@ job "jitsi" { resources { cpu = 900 memory = 1500 - network { - port "video1_port" { - static = "8080" - } - port "video2_port" { - static = "10000" - } - } - } service { - tags = [ - "jitsi", - "(diplonat (tcp_port 8080) (udp_port 10000))" - ] - port = "video1_port" - address_mode = "host" + tags = [ "jitsi", "(diplonat (tcp_port 8080))" ] + port = 8080 + address_mode = "driver" name = "jitsi-videobridge-video1" check { type = "tcp" - port = "video1_port" + port = 8080 + address_mode = "driver" interval = "60s" timeout = "5s" check_restart { @@ -245,8 +220,14 @@ job "jitsi" { } } } - } + service { + tags = [ "jitsi", "(diplonat (udp_port 10000))" ] + port = 10000 + address_mode = "driver" + name = "jitsi-videobridge-video2" + } + } } } -- cgit v1.2.3