infrastructure/app/deployment/jitsi.hcl

234 lines
5.5 KiB
HCL
Raw Normal View History

2020-03-27 08:49:51 +00:00
job "jitsi" {
datacenters = ["dc1"]
type = "service"
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
group "core" {
task "xmpp" {
driver = "docker"
config {
2020-09-13 10:00:48 +00:00
image = "superboum/amd64_jitsi_xmpp:v4"
2020-03-27 08:49:51 +00:00
network_mode = "host"
}
2020-03-27 20:50:00 +00:00
template {
data = "{{ key \"secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt\" }}"
destination = "secrets/certs/auth.jitsi.deuxfleurs.fr.crt"
}
template {
data = "{{ key \"secrets/jitsi/auth.jitsi.deuxfleurs.fr.key\" }}"
destination = "secrets/certs/auth.jitsi.deuxfleurs.fr.key"
}
template {
data = "{{ key \"secrets/jitsi/jitsi.deuxfleurs.fr.crt\" }}"
destination = "secrets/certs/jitsi.deuxfleurs.fr.crt"
}
template {
data = "{{ key \"secrets/jitsi/jitsi.deuxfleurs.fr.key\" }}"
destination = "secrets/certs/jitsi.deuxfleurs.fr.key"
}
2020-03-27 21:48:12 +00:00
artifact {
source = "http://127.0.0.1:8500/v1/kv/secrets/jitsi/global_env?raw"
destination = "secrets/global_env.tpl"
mode = "file"
}
2020-03-27 20:50:00 +00:00
template {
2020-03-27 21:48:12 +00:00
source = "secrets/global_env.tpl"
2020-03-27 20:50:00 +00:00
destination = "secrets/global_env"
env = true
}
2020-03-27 08:49:51 +00:00
resources {
cpu = 300
memory = 200
}
service {
2020-10-28 13:12:15 +00:00
tags = [ "jitsi", "bosh" ]
port = 5280
address_mode = "driver"
2020-03-27 08:49:51 +00:00
name = "jitsi-xmpp-bosh"
check {
type = "tcp"
2020-10-28 13:12:15 +00:00
address_mode = "driver"
port = 5280
2020-03-27 08:49:51 +00:00
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
2020-10-28 13:12:15 +00:00
service {
tags = [ "jitsi", "ext" ]
port = 5347
address_mode = "driver"
name = "jitsi-ext"
}
service {
tags = [ "jitsi", "xmpp" ]
port = 5222
address_mode = "driver"
name = "jitsi-xmpp"
}
2020-03-27 08:49:51 +00:00
}
task "front" {
driver = "docker"
config {
2020-09-12 20:18:30 +00:00
image = "superboum/amd64_jitsi_meet:v1"
2020-03-27 08:49:51 +00:00
network_mode = "host"
}
2020-03-27 20:50:00 +00:00
template {
2020-03-27 20:54:11 +00:00
data = "{{ key \"secrets/jitsi/jitsi.deuxfleurs.fr.crt\" }}"
destination = "secrets/certs/jitsi.deuxfleurs.fr.crt"
2020-03-27 20:50:00 +00:00
}
template {
2020-03-27 20:54:11 +00:00
data = "{{ key \"secrets/jitsi/jitsi.deuxfleurs.fr.key\" }}"
destination = "secrets/certs/jitsi.deuxfleurs.fr.key"
2020-03-27 20:50:00 +00:00
}
2020-03-27 21:48:12 +00:00
artifact {
source = "http://127.0.0.1:8500/v1/kv/secrets/jitsi/global_env?raw"
destination = "secrets/global_env.tpl"
mode = "file"
}
2020-03-27 20:50:00 +00:00
template {
2020-03-27 21:48:12 +00:00
source = "secrets/global_env.tpl"
2020-03-27 20:50:00 +00:00
destination = "secrets/global_env"
env = true
}
2020-03-27 08:49:51 +00:00
resources {
cpu = 300
memory = 200
}
service {
tags = [
"jitsi",
"traefik.enable=true",
"traefik.frontend.entryPoints=https,http",
2020-03-27 20:50:00 +00:00
"traefik.frontend.rule=Host:jitsi.deuxfleurs.fr;PathPrefix:/",
"traefik.protocol=https"
2020-03-27 08:49:51 +00:00
]
2020-10-28 13:12:15 +00:00
port = 443
address_mode = "driver"
2020-03-27 08:49:51 +00:00
name = "jitsi-front-https"
check {
type = "tcp"
2020-10-28 13:12:15 +00:00
port = 443
address_mode = "driver"
2020-03-27 08:49:51 +00:00
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
}
task "jicofo" {
driver = "docker"
config {
2020-09-13 10:00:48 +00:00
image = "superboum/amd64_jitsi_conference_focus:v5"
2020-03-27 08:49:51 +00:00
network_mode = "host"
}
2020-03-27 20:50:00 +00:00
template {
data = "{{ key \"secrets/jitsi/jitsi.deuxfleurs.fr.crt\" }}"
destination = "secrets/certs/jitsi.deuxfleurs.fr.crt"
}
template {
data = "{{ key \"secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt\" }}"
destination = "secrets/certs/auth.jitsi.deuxfleurs.fr.crt"
}
2020-03-27 21:48:12 +00:00
artifact {
source = "http://127.0.0.1:8500/v1/kv/secrets/jitsi/global_env?raw"
destination = "secrets/global_env.tpl"
mode = "file"
}
2020-03-27 20:50:00 +00:00
template {
2020-03-27 21:48:12 +00:00
source = "secrets/global_env.tpl"
2020-03-27 20:50:00 +00:00
destination = "secrets/global_env"
env = true
}
2020-03-27 08:49:51 +00:00
resources {
cpu = 300
2020-06-14 09:48:53 +00:00
memory = 400
2020-03-27 08:49:51 +00:00
}
}
task "videobridge" {
driver = "docker"
config {
2020-09-13 10:00:48 +00:00
image = "superboum/amd64_jitsi_videobridge:v15"
2020-03-27 08:49:51 +00:00
network_mode = "host"
2020-03-28 07:39:02 +00:00
ulimit {
nofile = "1048576:1048576"
nproc = "65536:65536"
}
2020-03-27 08:49:51 +00:00
}
2020-04-02 18:24:50 +00:00
env {
2020-04-05 08:41:24 +00:00
#JITSI_DEBUG = 1
JITSI_VIDEO_TCP = 8080
2020-04-02 18:24:50 +00:00
}
2020-03-27 21:48:12 +00:00
artifact {
source = "http://127.0.0.1:8500/v1/kv/secrets/jitsi/global_env?raw"
destination = "secrets/global_env.tpl"
mode = "file"
}
2020-03-27 20:50:00 +00:00
template {
2020-03-27 21:48:12 +00:00
source = "secrets/global_env.tpl"
2020-03-27 20:50:00 +00:00
destination = "secrets/global_env"
env = true
}
2020-03-27 08:49:51 +00:00
resources {
2020-03-28 07:39:02 +00:00
cpu = 900
memory = 1500
2020-03-27 08:49:51 +00:00
}
service {
2020-10-28 13:12:15 +00:00
tags = [ "jitsi", "(diplonat (tcp_port 8080))" ]
port = 8080
address_mode = "driver"
2020-03-27 08:49:51 +00:00
name = "jitsi-videobridge-video1"
check {
type = "tcp"
2020-10-28 13:12:15 +00:00
port = 8080
address_mode = "driver"
2020-03-27 08:49:51 +00:00
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
2020-10-28 13:12:15 +00:00
service {
tags = [ "jitsi", "(diplonat (udp_port 10000))" ]
port = 10000
address_mode = "driver"
name = "jitsi-videobridge-video2"
}
}
2020-03-27 08:49:51 +00:00
}
}