aboutsummaryrefslogtreecommitdiff
path: root/app/deployment
diff options
context:
space:
mode:
Diffstat (limited to 'app/deployment')
-rw-r--r--app/deployment/traefik.hcl43
1 files changed, 30 insertions, 13 deletions
diff --git a/app/deployment/traefik.hcl b/app/deployment/traefik.hcl
index 641187f..d0dc129 100644
--- a/app/deployment/traefik.hcl
+++ b/app/deployment/traefik.hcl
@@ -4,6 +4,13 @@ job "frontend" {
priority = 80
group "traefik" {
+
+ network {
+ port "http_port" { static = 80 }
+ port "https_port" { static = 443 }
+ port "admin_port" { static = 8082 }
+ }
+
task "server" {
driver = "docker"
@@ -14,21 +21,36 @@ job "frontend" {
volumes = [
"secrets/traefik.toml:/etc/traefik/traefik.toml",
]
+ ports = [ "http_port", "https_port", "admin_port" ]
}
resources {
memory = 265
}
+ template {
+ data = file("../config/configuration/traefik/traefik.toml")
+ destination = "secrets/traefik.toml"
+ }
+
service {
- tags = [
- "https",
- "frontend",
- "(diplonat (tcp_port 80 443))"
- ]
- port = 443
- address_mode = "driver"
- name = "traefik"
+ 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"
check {
type = "http"
protocol = "http"
@@ -44,11 +66,6 @@ job "frontend" {
}
}
}
-
- template {
- data = "{{ key \"configuration/traefik/traefik.toml\" }}"
- destination = "secrets/traefik.toml"
- }
}
}
}