Skip to content

Commit eb74460

Browse files
committed
Ad missing pipeline requirement
1 parent 0ab86d0 commit eb74460

2 files changed

Lines changed: 36 additions & 20 deletions

File tree

_nomad/backend.nomad

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ job "backend" {
1111
value = "backend"
1212
}
1313

14+
task "init-dir" {
15+
driver = "exec"
16+
17+
config {
18+
command = "/bin/mkdir"
19+
args = ["-p", "/var/log/app-redirect-balancer"]
20+
}
21+
22+
lifecycle {
23+
hook = "prestart"
24+
}
25+
26+
resources {
27+
cpu = 100
28+
memory = 64
29+
}
30+
}
31+
1432
task "backend" {
1533
driver = "docker"
1634

_nomad/loadbalancer.nomad

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ job "loadbalancer" {
1111
value = "balancer"
1212
}
1313

14+
task "init-dir" {
15+
driver = "exec"
16+
17+
config {
18+
command = "/bin/mkdir"
19+
args = ["-p", "/var/log/app-redirect-balancer"]
20+
}
21+
22+
lifecycle {
23+
hook = "prestart"
24+
}
25+
26+
resources {
27+
cpu = 100
28+
memory = 64
29+
}
30+
}
31+
1432
task "loadbalancer" {
1533
driver = "docker"
1634

@@ -30,26 +48,6 @@ job "loadbalancer" {
3048
cpu = 1000
3149
memory = 512
3250
}
33-
34-
service {
35-
name = "loadbalancer"
36-
port = "http"
37-
tags = ["loadbalancer"]
38-
39-
check {
40-
name = "alive"
41-
type = "http"
42-
path = "/health"
43-
interval = "10s"
44-
timeout = "2s"
45-
46-
check_restart {
47-
limit = 3
48-
grace = "90s"
49-
ignore_warnings = false
50-
}
51-
}
52-
}
5351
}
5452

5553
network {

0 commit comments

Comments
 (0)