-
Notifications
You must be signed in to change notification settings - Fork 1
/
postgres.nomad
58 lines (47 loc) · 1.08 KB
/
postgres.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
51
52
53
54
55
56
57
58
job "postgres" {
datacenters = ["dc1"]
type = "service"
update {
stagger = "10s"
max_parallel = 1
}
group "db_p" {
count = 1
restart {
attempts = 10
interval = "5m"
delay = "25s"
mode = "delay"
}
ephemeral_disk {
size = 300
}
task "postgres" {
driver = "docker"
config {
image = "postgres"
port_map {
db = 5432
}
}
resources {
cpu = 500 # 500 MHz
memory = 256 # 256MB
network {
mbits = 10
port "db_p" {}
}
}
service {
name = "postgres"
tags = ["db_p"]
port = "db_p"
check {
type = "tcp"
interval = "10s"
timeout = "4s"
}
}
}
}
}