rework jitsi service

This commit is contained in:
Quentin 2020-10-28 14:12:15 +01:00
parent 2ef6ab1881
commit d8d0d74920

View file

@ -13,11 +13,6 @@ job "jitsi" {
config { config {
image = "superboum/amd64_jitsi_xmpp:v4" image = "superboum/amd64_jitsi_xmpp:v4"
network_mode = "host" network_mode = "host"
port_map {
xmpp_port = 5222
ext_port = 5347
bosh_port = 5280
}
} }
template { template {
@ -50,29 +45,17 @@ job "jitsi" {
resources { resources {
cpu = 300 cpu = 300
memory = 200 memory = 200
network {
port "xmpp_port" {
static = "5222"
}
port "ext_port" {
static = "5347"
}
port "bosh_port" {
static = "5280"
}
}
} }
service { service {
tags = [ tags = [ "jitsi", "bosh" ]
"jitsi" port = 5280
] address_mode = "driver"
port = "bosh_port"
address_mode = "host"
name = "jitsi-xmpp-bosh" name = "jitsi-xmpp-bosh"
check { check {
type = "tcp" type = "tcp"
port = "bosh_port" address_mode = "driver"
port = 5280
interval = "60s" interval = "60s"
timeout = "5s" timeout = "5s"
check_restart { 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" { task "front" {
@ -89,9 +86,6 @@ job "jitsi" {
config { config {
image = "superboum/amd64_jitsi_meet:v1" image = "superboum/amd64_jitsi_meet:v1"
network_mode = "host" network_mode = "host"
port_map {
https_port = 443
}
} }
template { template {
@ -116,11 +110,6 @@ job "jitsi" {
resources { resources {
cpu = 300 cpu = 300
memory = 200 memory = 200
network {
port "https_port" {
static = "443"
}
}
} }
service { service {
@ -131,12 +120,13 @@ job "jitsi" {
"traefik.frontend.rule=Host:jitsi.deuxfleurs.fr;PathPrefix:/", "traefik.frontend.rule=Host:jitsi.deuxfleurs.fr;PathPrefix:/",
"traefik.protocol=https" "traefik.protocol=https"
] ]
port = "https_port" port = 443
address_mode = "host" address_mode = "driver"
name = "jitsi-front-https" name = "jitsi-front-https"
check { check {
type = "tcp" type = "tcp"
port = "https_port" port = 443
address_mode = "driver"
interval = "60s" interval = "60s"
timeout = "5s" timeout = "5s"
check_restart { check_restart {
@ -185,10 +175,6 @@ job "jitsi" {
config { config {
image = "superboum/amd64_jitsi_videobridge:v15" image = "superboum/amd64_jitsi_videobridge:v15"
network_mode = "host" network_mode = "host"
port_map {
video1_port = 8080
video2_port = 10000
}
ulimit { ulimit {
nofile = "1048576:1048576" nofile = "1048576:1048576"
nproc = "65536:65536" nproc = "65536:65536"
@ -214,28 +200,17 @@ job "jitsi" {
resources { resources {
cpu = 900 cpu = 900
memory = 1500 memory = 1500
network {
port "video1_port" {
static = "8080"
}
port "video2_port" {
static = "10000"
}
}
} }
service { service {
tags = [ tags = [ "jitsi", "(diplonat (tcp_port 8080))" ]
"jitsi", port = 8080
"(diplonat (tcp_port 8080) (udp_port 10000))" address_mode = "driver"
]
port = "video1_port"
address_mode = "host"
name = "jitsi-videobridge-video1" name = "jitsi-videobridge-video1"
check { check {
type = "tcp" type = "tcp"
port = "video1_port" port = 8080
address_mode = "driver"
interval = "60s" interval = "60s"
timeout = "5s" timeout = "5s"
check_restart { check_restart {
@ -245,8 +220,14 @@ job "jitsi" {
} }
} }
} }
}
service {
tags = [ "jitsi", "(diplonat (udp_port 10000))" ]
port = 10000
address_mode = "driver"
name = "jitsi-videobridge-video2"
}
}
} }
} }