This repository has been archived on 2023-03-15. You can view files and clone it, but cannot push or open issues or pull requests.
infrastructure/app/frontend/deploy/frontend-traefik.hcl

83 lines
1.6 KiB
HCL
Raw Normal View History

2019-06-01 14:02:49 +00:00
job "frontend" {
datacenters = ["dc1"]
type = "service"
2020-12-18 09:32:44 +00:00
priority = 80
2019-06-01 14:02:49 +00:00
2021-12-08 12:32:47 +00:00
update {
max_parallel = 1
stagger = "1m"
}
2019-06-01 14:02:49 +00:00
group "traefik" {
2021-12-08 12:32:47 +00:00
count = 3
constraint {
operator = "distinct_hosts"
value = "true"
}
2020-12-28 10:02:33 +00:00
network {
port "http_port" { static = 80 }
port "https_port" { static = 443 }
port "admin_port" { static = 8082 }
}
2019-06-01 14:02:49 +00:00
task "server" {
driver = "docker"
config {
2021-10-12 08:21:18 +00:00
image = "amd64/traefik:1.7.28"
2019-06-01 14:02:49 +00:00
readonly_rootfs = true
2020-10-28 11:08:23 +00:00
network_mode = "host"
2019-06-01 14:02:49 +00:00
volumes = [
"secrets/traefik.toml:/etc/traefik/traefik.toml",
]
2020-12-28 10:02:33 +00:00
ports = [ "http_port", "https_port", "admin_port" ]
2019-06-01 14:02:49 +00:00
}
resources {
2020-05-21 09:54:32 +00:00
memory = 265
2019-06-01 14:02:49 +00:00
}
2020-12-28 10:02:33 +00:00
template {
data = file("../config/traefik.toml")
2020-12-28 10:02:33 +00:00
destination = "secrets/traefik.toml"
}
2019-06-01 14:02:49 +00:00
service {
2020-12-28 10:02:33 +00:00
name = "traefik-http"
port = "http_port"
tags = [ "(diplonat (tcp_port 80))" ]
address_mode = "host"
}
service {
name = "traefik-https"
port = "https_port"
tags = [ "(diplonat (tcp_port 443))" ]
address_mode = "host"
}
service {
name = "traefik-admin"
port = "admin_port"
address_mode = "host"
2019-06-01 14:02:49 +00:00
check {
2020-05-05 14:34:16 +00:00
type = "http"
protocol = "http"
2020-10-28 11:08:23 +00:00
port = 8082
address_mode = "driver"
2020-05-05 14:34:16 +00:00
path = "/ping"
2019-06-01 14:02:49 +00:00
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
}
}
}