2020-03-27 08:49:51 +00:00
|
|
|
/*
|
|
|
|
* WIP WIP WIP WIP
|
|
|
|
*
|
|
|
|
* + NEED TO SET ENV VARIABLES
|
|
|
|
*/
|
|
|
|
|
|
|
|
job "jitsi" {
|
|
|
|
datacenters = ["dc1"]
|
|
|
|
type = "service"
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "${attr.cpu.arch}"
|
|
|
|
value = "amd64"
|
|
|
|
}
|
|
|
|
|
|
|
|
group "core" {
|
|
|
|
task "xmpp" {
|
|
|
|
driver = "docker"
|
|
|
|
config {
|
|
|
|
image = "superboum/amd64_jitsi_xmpp:v1"
|
|
|
|
network_mode = "host"
|
|
|
|
port_map {
|
|
|
|
xmpp_port = 5222
|
|
|
|
ext_port = 5347
|
|
|
|
bosh_port = 5280
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
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"
|
|
|
|
name = "jitsi-xmpp-bosh"
|
|
|
|
check {
|
|
|
|
type = "tcp"
|
|
|
|
port = "bosh_port"
|
|
|
|
interval = "60s"
|
|
|
|
timeout = "5s"
|
|
|
|
check_restart {
|
|
|
|
limit = 3
|
|
|
|
grace = "90s"
|
|
|
|
ignore_warnings = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task "front" {
|
|
|
|
driver = "docker"
|
|
|
|
config {
|
2020-04-05 08:41:24 +00:00
|
|
|
image = "superboum/amd64_jitsi_front:v3"
|
2020-03-27 08:49:51 +00:00
|
|
|
network_mode = "host"
|
|
|
|
port_map {
|
|
|
|
https_port = 443
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
network {
|
|
|
|
port "https_port" {
|
|
|
|
static = "443"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
]
|
|
|
|
port = "https_port"
|
|
|
|
address_mode = "host"
|
|
|
|
name = "jitsi-front-https"
|
|
|
|
check {
|
|
|
|
type = "tcp"
|
|
|
|
port = "https_port"
|
|
|
|
interval = "60s"
|
|
|
|
timeout = "5s"
|
|
|
|
check_restart {
|
|
|
|
limit = 3
|
|
|
|
grace = "90s"
|
|
|
|
ignore_warnings = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task "jicofo" {
|
|
|
|
driver = "docker"
|
|
|
|
config {
|
|
|
|
image = "superboum/amd64_jitsi_conference_focus:v1"
|
|
|
|
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
|
|
|
|
memory = 200
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task "videobridge" {
|
|
|
|
driver = "docker"
|
|
|
|
config {
|
2020-04-05 08:41:24 +00:00
|
|
|
image = "superboum/amd64_jitsi_videobridge:v6"
|
2020-03-27 08:49:51 +00:00
|
|
|
network_mode = "host"
|
|
|
|
port_map {
|
2020-04-05 08:41:24 +00:00
|
|
|
video1_port = 8080
|
2020-03-27 08:49:51 +00:00
|
|
|
video2_port = 10000
|
|
|
|
}
|
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
|
|
|
network {
|
|
|
|
port "video1_port" {
|
2020-04-05 08:41:24 +00:00
|
|
|
static = "8080"
|
2020-03-27 08:49:51 +00:00
|
|
|
}
|
|
|
|
port "video2_port" {
|
|
|
|
static = "10000"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
tags = [
|
|
|
|
"jitsi"
|
|
|
|
]
|
|
|
|
port = "video1_port"
|
|
|
|
address_mode = "host"
|
|
|
|
name = "jitsi-videobridge-video1"
|
|
|
|
check {
|
|
|
|
type = "tcp"
|
|
|
|
port = "video1_port"
|
|
|
|
interval = "60s"
|
|
|
|
timeout = "5s"
|
|
|
|
check_restart {
|
|
|
|
limit = 3
|
|
|
|
grace = "90s"
|
|
|
|
ignore_warnings = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|