-
Notifications
You must be signed in to change notification settings - Fork 1
/
fabio.nomad
50 lines (45 loc) · 907 Bytes
/
fabio.nomad
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
variable "fabio_version" {
type = string
default = "1.6.3"
description = "Version of Fabio to use"
}
job "fabio" {
datacenters = ["dc1"]
type = "system"
meta {
auto-backup = true
backup-schedule = "@daily"
backup-target-db = "postgres"
}
group "fabio" {
network {
port "lb" {
static = 9999
}
port "ui" {
static = 9998
}
}
restart {
attempts = 1
interval = "2m"
delay = "15s"
mode = "delay"
}
task "fabio" {
artifact {
source = "https://github.com/fabiolb/fabio/releases/download/v${var.fabio_version}/fabio-${var.fabio_version}-linux_${attr.cpu.arch}"
destination = "local/fabio"
mode = "file"
}
driver = "exec"
config {
command = "local/fabio"
}
resources {
cpu = 100
memory = 64
}
}
}
}