-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathhashibo.nomad.hcl
71 lines (62 loc) · 1.43 KB
/
hashibo.nomad.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# For full documentation and examples, see
# https://www.nomadproject.io/docs/job-specification/job.html
variable "consul_namespace"{
description = "which consul namespace you want to deploy this job to"
default = "default"
}
job "presentation" {
datacenters = ["eu-west","eu-west-2b","eu-west-2c","eu-west-2","dc1"]
type = "service"
group "presentation" {
count = 3
consul{
namespace = var.consul_namespace
}
network {
port "http" {
to = 80
}
}
task "hashibo" {
driver = "docker"
config {
image = "guybarros/hashibo:akamai_202310"
ports = ["http"]
}
logs {
max_files = 5
max_file_size = 15
}
service {
name = "hashibo"
tags = [
"urlprefix-/hashibo strip=/hashibo",
"traefik.enable=true",
"traefik.http.routers.hashibo.rule=PathPrefix(`/hashibo`)",
"traefik.http.middlewares.hashibo.stripprefix.prefixes=/hashibo"
]
port = "http"
check {
type = "http"
port = "http"
path = "/#/"
interval = "10s"
timeout = "2s"
}
}
}
restart {
attempts = 10
interval = "5m"
delay = "25s"
mode = "delay"
}
}
update {
max_parallel = 1
min_healthy_time = "5s"
healthy_deadline = "3m"
auto_revert = false
canary = 0
}
}