2020-07-01 16:44:27 +00:00
|
|
|
job "im" {
|
2019-06-01 14:02:49 +00:00
|
|
|
datacenters = ["dc1"]
|
|
|
|
type = "service"
|
2020-12-18 09:32:44 +00:00
|
|
|
priority = 60
|
2019-06-01 14:02:49 +00:00
|
|
|
|
|
|
|
group "matrix" {
|
|
|
|
count = 1
|
2020-12-22 17:24:33 +00:00
|
|
|
|
|
|
|
network {
|
|
|
|
port "client_port" { static = 8008 }
|
|
|
|
port "federation_port" { static = 8448 }
|
|
|
|
}
|
|
|
|
|
2019-06-01 14:02:49 +00:00
|
|
|
task "synapse" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
2020-12-10 08:32:16 +00:00
|
|
|
image = "particallydone/amd64_synapse:v39"
|
2020-10-28 15:55:11 +00:00
|
|
|
network_mode = "host"
|
2019-06-01 14:02:49 +00:00
|
|
|
readonly_rootfs = true
|
2020-12-22 17:24:33 +00:00
|
|
|
ports = [ "client_port", "federation_port" ]
|
2019-06-01 14:02:49 +00:00
|
|
|
command = "python"
|
|
|
|
args = [
|
|
|
|
"-m", "synapse.app.homeserver",
|
|
|
|
"-n",
|
|
|
|
"-c", "/etc/matrix-synapse/homeserver.yaml"
|
|
|
|
]
|
|
|
|
volumes = [
|
|
|
|
"secrets/conf:/etc/matrix-synapse",
|
|
|
|
"/mnt/glusterfs/chat/matrix/synapse/media:/var/lib/matrix-synapse/media",
|
|
|
|
"/mnt/glusterfs/chat/matrix/synapse/uploads:/var/lib/matrix-synapse/uploads",
|
|
|
|
"/tmp/synapse-logs:/var/log/matrix-synapse",
|
|
|
|
"/tmp/synapse:/tmp"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
2020-12-22 17:24:33 +00:00
|
|
|
data = file("../config/configuration/chat/synapse/homeserver.yaml")
|
2019-06-01 14:02:49 +00:00
|
|
|
destination = "secrets/conf/homeserver.yaml"
|
|
|
|
}
|
2019-10-27 14:26:21 +00:00
|
|
|
|
2020-02-28 19:08:37 +00:00
|
|
|
template {
|
2020-12-22 17:24:33 +00:00
|
|
|
data = file("../config/configuration/chat/easybridge/registration.yaml.tpl")
|
2020-02-28 19:08:37 +00:00
|
|
|
destination = "secrets/conf/easybridge_registration.yaml"
|
|
|
|
}
|
|
|
|
|
2019-06-01 14:02:49 +00:00
|
|
|
template {
|
2020-12-22 17:24:33 +00:00
|
|
|
data = file("../config/configuration/chat/synapse/log.yaml")
|
2019-06-01 14:02:49 +00:00
|
|
|
destination = "secrets/conf/log.yaml"
|
|
|
|
}
|
2020-12-22 17:24:33 +00:00
|
|
|
|
2019-06-01 14:02:49 +00:00
|
|
|
template {
|
2020-12-22 17:24:33 +00:00
|
|
|
data = file("../config/configuration/chat/synapse/conf.d/server_name.yaml")
|
2019-06-01 14:02:49 +00:00
|
|
|
destination = "secrets/conf/server_name.yaml"
|
|
|
|
}
|
2020-12-22 17:24:33 +00:00
|
|
|
|
2019-06-01 14:02:49 +00:00
|
|
|
template {
|
2020-12-22 17:24:33 +00:00
|
|
|
data = file("../config/configuration/chat/synapse/conf.d/report_stats.yaml")
|
2019-06-01 14:02:49 +00:00
|
|
|
destination = "secrets/conf/report_stats.yaml"
|
|
|
|
}
|
2020-12-22 17:24:33 +00:00
|
|
|
|
|
|
|
# --- secrets ---
|
2019-06-01 14:02:49 +00:00
|
|
|
template {
|
|
|
|
data = "{{ key \"secrets/chat/synapse/homeserver.tls.crt\" }}"
|
|
|
|
destination = "secrets/conf/homeserver.tls.crt"
|
|
|
|
}
|
2020-12-22 17:24:33 +00:00
|
|
|
|
2019-06-01 14:02:49 +00:00
|
|
|
template {
|
|
|
|
data = "{{ key \"secrets/chat/synapse/homeserver.tls.dh\" }}"
|
|
|
|
destination = "secrets/conf/homeserver.tls.dh"
|
|
|
|
}
|
2020-12-22 17:24:33 +00:00
|
|
|
|
2019-06-01 14:02:49 +00:00
|
|
|
template {
|
|
|
|
data = "{{ key \"secrets/chat/synapse/homeserver.tls.key\" }}"
|
|
|
|
destination = "secrets/conf/homeserver.tls.key"
|
|
|
|
}
|
2020-12-22 17:24:33 +00:00
|
|
|
|
2019-06-01 14:02:49 +00:00
|
|
|
template {
|
|
|
|
data = "{{ key \"secrets/chat/synapse/homeserver.signing.key\" }}"
|
|
|
|
destination = "secrets/conf/homeserver.signing.key"
|
|
|
|
}
|
|
|
|
|
|
|
|
env {
|
|
|
|
SYNAPSE_CACHE_FACTOR = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 1000
|
|
|
|
memory = 4000
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
2020-03-09 13:11:24 +00:00
|
|
|
name = "synapse-client"
|
2020-12-22 17:24:33 +00:00
|
|
|
port = "client_port"
|
2020-12-24 09:01:42 +00:00
|
|
|
address_mode = "host"
|
2019-06-01 14:02:49 +00:00
|
|
|
tags = [
|
|
|
|
"matrix",
|
|
|
|
"traefik.enable=true",
|
|
|
|
"traefik.frontend.entryPoints=https",
|
2020-03-09 13:11:24 +00:00
|
|
|
"traefik.frontend.rule=Host:im.deuxfleurs.fr;PathPrefix:/_matrix",
|
2020-05-05 14:14:01 +00:00
|
|
|
"traefik.frontend.headers.customResponseHeaders=Access-Control-Allow-Origin: *",
|
2020-03-09 13:11:24 +00:00
|
|
|
"traefik.frontend.priority=100"
|
2019-06-01 14:02:49 +00:00
|
|
|
]
|
|
|
|
check {
|
|
|
|
type = "tcp"
|
2020-12-22 17:24:33 +00:00
|
|
|
port = "client_port"
|
2019-06-01 14:02:49 +00:00
|
|
|
interval = "60s"
|
|
|
|
timeout = "5s"
|
|
|
|
check_restart {
|
|
|
|
limit = 3
|
|
|
|
grace = "90s"
|
|
|
|
ignore_warnings = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-03-09 13:11:24 +00:00
|
|
|
|
|
|
|
service {
|
|
|
|
name = "synapse-federation"
|
2020-12-22 17:24:33 +00:00
|
|
|
port = "federation_port"
|
2020-12-24 09:01:42 +00:00
|
|
|
address_mode = "host"
|
2020-03-09 13:11:24 +00:00
|
|
|
tags = [
|
|
|
|
"matrix",
|
|
|
|
"traefik.enable=true",
|
|
|
|
"traefik.frontend.entryPoints=https",
|
|
|
|
"traefik.frontend.rule=Host:deuxfleurs.fr;PathPrefix:/_matrix",
|
|
|
|
"traefik.frontend.priority=100"
|
|
|
|
]
|
|
|
|
}
|
2019-06-01 14:02:49 +00:00
|
|
|
}
|
|
|
|
}
|
2020-02-28 19:08:37 +00:00
|
|
|
|
|
|
|
group "easybridge" {
|
|
|
|
count = 1
|
2020-12-22 17:24:33 +00:00
|
|
|
|
|
|
|
network {
|
|
|
|
port "api_port" {
|
|
|
|
static = 8321
|
|
|
|
to = 8321
|
|
|
|
}
|
|
|
|
port "web_port" { to = 8281 }
|
|
|
|
}
|
|
|
|
|
2020-02-28 19:08:37 +00:00
|
|
|
task "easybridge" {
|
|
|
|
driver = "docker"
|
|
|
|
config {
|
2020-10-09 22:03:51 +00:00
|
|
|
image = "lxpz/easybridge_amd64:33"
|
2020-12-22 17:24:33 +00:00
|
|
|
ports = [ "api_port", "web_port" ]
|
2020-02-28 19:08:37 +00:00
|
|
|
volumes = [
|
2020-12-22 17:24:33 +00:00
|
|
|
"secrets/conf:/data"
|
2020-02-28 19:08:37 +00:00
|
|
|
]
|
2020-03-02 20:56:45 +00:00
|
|
|
args = [ "./easybridge", "-config", "/data/config.json" ]
|
2020-02-28 19:08:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
2020-12-22 17:24:33 +00:00
|
|
|
data = file("../config/configuration/chat/easybridge/registration.yaml.tpl")
|
2020-02-28 19:08:37 +00:00
|
|
|
destination = "secrets/conf/registration.yaml"
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
2020-12-22 17:24:33 +00:00
|
|
|
data = file("../config/configuration/chat/easybridge/config.json.tpl")
|
2020-02-28 19:08:37 +00:00
|
|
|
destination = "secrets/conf/config.json"
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
2020-02-28 21:40:31 +00:00
|
|
|
memory = 500
|
|
|
|
cpu = 1000
|
2020-02-28 19:08:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "easybridge-api"
|
|
|
|
tags = ["easybridge-api"]
|
|
|
|
port = "api_port"
|
|
|
|
address_mode = "host"
|
|
|
|
check {
|
|
|
|
type = "tcp"
|
|
|
|
port = "api_port"
|
|
|
|
interval = "60s"
|
|
|
|
timeout = "5s"
|
|
|
|
check_restart {
|
|
|
|
limit = 3
|
|
|
|
grace = "90s"
|
|
|
|
ignore_warnings = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "easybridge-web"
|
|
|
|
tags = [
|
|
|
|
"easybridge-web",
|
|
|
|
"traefik.enable=true",
|
|
|
|
"traefik.frontend.entryPoints=https,http",
|
|
|
|
"traefik.frontend.rule=Host:easybridge.deuxfleurs.fr",
|
|
|
|
]
|
|
|
|
port = "web_port"
|
|
|
|
address_mode = "host"
|
|
|
|
check {
|
|
|
|
type = "tcp"
|
|
|
|
port = "web_port"
|
|
|
|
interval = "60s"
|
|
|
|
timeout = "5s"
|
|
|
|
check_restart {
|
|
|
|
limit = 3
|
|
|
|
grace = "90s"
|
|
|
|
ignore_warnings = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-06-01 14:02:49 +00:00
|
|
|
group "riotweb" {
|
|
|
|
count = 1
|
|
|
|
|
2020-12-22 17:24:33 +00:00
|
|
|
network {
|
|
|
|
port "web_port" { to = 8043 }
|
|
|
|
}
|
|
|
|
|
2019-06-01 14:02:49 +00:00
|
|
|
task "server" {
|
|
|
|
driver = "docker"
|
|
|
|
config {
|
2020-11-29 22:13:17 +00:00
|
|
|
image = "particallydone/amd64_riotweb:v18"
|
2020-12-22 17:24:33 +00:00
|
|
|
ports = [ "web_port" ]
|
2019-06-01 14:02:49 +00:00
|
|
|
volumes = [
|
2020-12-22 17:24:33 +00:00
|
|
|
"secrets/config.json:/srv/http/config.json"
|
2019-06-01 14:02:49 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
template {
|
2020-12-22 17:24:33 +00:00
|
|
|
data = file("../config/configuration/chat/riot_web/config.json")
|
2019-06-01 14:02:49 +00:00
|
|
|
destination = "secrets/config.json"
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
memory = 21
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
tags = [
|
|
|
|
"webstatic",
|
|
|
|
"traefik.enable=true",
|
|
|
|
"traefik.frontend.entryPoints=https",
|
2020-03-09 13:14:54 +00:00
|
|
|
"traefik.frontend.rule=Host:im.deuxfleurs.fr,riot.deuxfleurs.fr;PathPrefix:/",
|
|
|
|
"traefik.frontend.priority=10"
|
2019-06-01 14:02:49 +00:00
|
|
|
]
|
|
|
|
port = "web_port"
|
|
|
|
address_mode = "host"
|
|
|
|
name = "webstatic"
|
|
|
|
check {
|
|
|
|
type = "tcp"
|
|
|
|
port = "web_port"
|
|
|
|
interval = "60s"
|
|
|
|
timeout = "5s"
|
|
|
|
check_restart {
|
|
|
|
limit = 3
|
|
|
|
grace = "90s"
|
|
|
|
ignore_warnings = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|