forked from clstokes/example-nomad-nginx-secrets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx-2-template.nomad
More file actions
62 lines (53 loc) · 1.05 KB
/
nginx-2-template.nomad
File metadata and controls
62 lines (53 loc) · 1.05 KB
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
job "nginx" {
datacenters = ["dc1"]
type = "service"
group "nginx" {
count = 1
task "nginx" {
driver = "docker"
config {
image = "nginx"
port_map {
http = 80
}
volumes = [
"custom/default.conf:/etc/nginx/conf.d/default.conf"
]
}
template {
data = <<EOH
server {
location / {
root /local/data/;
}
}
EOH
destination = "custom/default.conf"
}
template {
data = <<EOH
Good morning.
EOH
destination = "local/data/index.html"
}
resources {
cpu = 100 # 100 MHz
memory = 128 # 128 MB
network {
mbits = 10
port "http" {}
}
}
service {
name = "nginx"
tags = ["frontend","urlprefix-/nginx strip=/nginx"]
port = "http"
check {
type = "tcp"
interval = "10s"
timeout = "2s"
}
}
}
}
}