2021-08-20 15:39:07 +00:00
|
|
|
job "bagage" {
|
2019-12-04 15:50:03 +00:00
|
|
|
datacenters = ["dc1"]
|
|
|
|
type = "service"
|
2021-08-20 15:39:07 +00:00
|
|
|
priority = 90
|
2019-12-04 15:50:03 +00:00
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "${attr.cpu.arch}"
|
|
|
|
value = "amd64"
|
|
|
|
}
|
|
|
|
|
2021-08-20 15:39:07 +00:00
|
|
|
group "main" {
|
|
|
|
count = 1
|
|
|
|
|
2020-12-28 09:49:09 +00:00
|
|
|
network {
|
2021-08-20 15:39:07 +00:00
|
|
|
port "web_port" { to = 8080 }
|
2021-11-20 13:56:56 +00:00
|
|
|
port "ssh_port" {
|
|
|
|
static = 2222
|
|
|
|
to = 2222
|
|
|
|
}
|
2020-12-28 09:49:09 +00:00
|
|
|
}
|
|
|
|
|
2021-08-20 15:39:07 +00:00
|
|
|
task "server" {
|
2019-12-04 15:50:03 +00:00
|
|
|
driver = "docker"
|
|
|
|
config {
|
2021-12-09 08:39:47 +00:00
|
|
|
image = "superboum/amd64_bagage:v11"
|
2021-11-20 13:56:56 +00:00
|
|
|
readonly_rootfs = false
|
|
|
|
volumes = [
|
|
|
|
"secrets/id_rsa:/id_rsa"
|
|
|
|
]
|
|
|
|
ports = [ "web_port", "ssh_port" ]
|
2019-12-04 15:50:03 +00:00
|
|
|
}
|
|
|
|
|
2021-08-20 15:39:07 +00:00
|
|
|
env {
|
|
|
|
BAGAGE_LDAP_ENDPOINT = "bottin2.service.2.cluster.deuxfleurs.fr:389"
|
|
|
|
}
|
|
|
|
|
2019-12-04 15:50:03 +00:00
|
|
|
resources {
|
2021-09-10 16:32:50 +00:00
|
|
|
memory = 500
|
2019-12-04 15:50:03 +00:00
|
|
|
}
|
|
|
|
|
2021-11-20 13:56:56 +00:00
|
|
|
template {
|
|
|
|
data = "{{ key \"secrets/bagage/id_rsa\" }}"
|
|
|
|
destination = "secrets/id_rsa"
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "bagage-ssh"
|
|
|
|
port = "ssh_port"
|
|
|
|
address_mode = "host"
|
|
|
|
tags = [
|
|
|
|
"bagage",
|
|
|
|
"(diplonat (tcp_port 2222))"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2019-12-04 15:50:03 +00:00
|
|
|
service {
|
2021-11-20 13:56:56 +00:00
|
|
|
name = "bagage-webdav"
|
2019-12-04 15:50:03 +00:00
|
|
|
tags = [
|
2021-08-20 15:39:07 +00:00
|
|
|
"bagage",
|
2019-12-04 15:50:03 +00:00
|
|
|
"traefik.enable=true",
|
|
|
|
"traefik.frontend.entryPoints=https,http",
|
2021-08-20 15:39:07 +00:00
|
|
|
"traefik.frontend.rule=Host:bagage.deuxfleurs.fr",
|
2021-12-08 11:42:48 +00:00
|
|
|
"tricot bagage.deuxfleurs.fr",
|
2019-12-04 15:50:03 +00:00
|
|
|
]
|
|
|
|
port = "web_port"
|
|
|
|
address_mode = "host"
|
|
|
|
check {
|
|
|
|
type = "tcp"
|
|
|
|
port = "web_port"
|
2021-11-20 13:56:56 +00:00
|
|
|
address_mode = "host"
|
2019-12-04 15:50:03 +00:00
|
|
|
interval = "60s"
|
|
|
|
timeout = "5s"
|
|
|
|
check_restart {
|
|
|
|
limit = 3
|
|
|
|
grace = "90s"
|
|
|
|
ignore_warnings = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|