-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.nomad
72 lines (65 loc) · 1.31 KB
/
deploy.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
59
60
61
62
63
64
65
66
67
68
69
70
71
job "sunsetglow-site" {
datacenters = ["frieren"]
namespace = "sunsetglow"
type = "service"
group "sunsetglow-site" {
count = 1
network {
mode = "bridge"
}
service {
name = "sunsetglow-site"
port = "80"
connect {
sidecar_service {}
}
check {
expose = true
type = "http"
path = "/health"
interval = "10s"
timeout = "2s"
}
}
task "sunsetglow-site" {
driver = "docker"
config {
image = "nginx"
volumes = [
"local/dist:/www",
"local/nginx.conf:/etc/nginx/conf.d/default.conf",
]
}
artifact {
source = "[[.artifact_source_url]]"
destination = "local/dist"
}
template {
data = <<EOF
server {
listen 80;
listen [::]:80;
root /www;
index index.html;
location /health {
return 200 'ok';
}
}
EOF
destination = "local/nginx.conf"
change_mode = "signal"
change_signal = "SIGHUP"
}
}
}
update {
max_parallel = 1
health_check = "checks"
min_healthy_time = "10s"
healthy_deadline = "1m"
progress_deadline = "10m"
auto_revert = true
auto_promote = true
canary = 1
}
}