/
docker-registry.nomad
54 lines (44 loc) · 1.06 KB
/
docker-registry.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
job "dockerregistry" {
datacenters = ["alpha"]
type = "service"
group "dockerregistry" {
# I only want one of these running at a time
count = 1
task "dockerregistry" {
# gotta use the docker driver
driver = "docker"
config {
image = "registry:2"
network_mode = "bridge"
# I mount the dockerregistry folder to /var/lib/registry
# so that I can persist the images on my NAS through
# deploys and restarts
volumes = [
"/mnt/configs/dockerregistry:/var/lib/registry"
]
port_map {
dockerregistry = 5000
}
labels {}
}
resources {
cpu = 500 # 500 MHz
memory = 1024 # 1G
network {
mbits = 100
port "dockerregistry"{}
}
}
service {
name = "dockerregistry"
port = "dockerregistry"
check {
name = "alive"
type = "tcp"
interval = "10s"
timeout = "2s"
}
}
}
}
}