forked from lpotthast/leptonic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathleptonic-book.jobspec.hcl
63 lines (54 loc) · 1.25 KB
/
leptonic-book.jobspec.hcl
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
job "leptonic-book" {
datacenters = ["dc1"]
type = "service"
group "leptonic-book" {
count = 1
network {
port "https" {
to = "443"
}
}
restart {
attempts = 10
interval = "5m"
delay = "25s"
mode = "delay"
}
task "leptonic-book" {
driver = "docker"
env {
DOMAIN = "leptonic.dev"
CONSUL_HTTP_ADDR = "172.17.0.1:8500"
HTTPS_PORT = "${NOMAD_PORT_https}"
URL_PREFIX = "/"
}
config {
image = "registry.gitlab.com/lukaspotthast/leptonic/leptonic-book:{{TAG}}"
auth {
username = "{{REGISTRY_USERNAME}}"
password = "{{REGISTRY_TOKEN}}"
}
ports = ["https"]
}
resources {
cpu = 512
memory = 256
}
service {
name = "leptonic-book"
tags = [
# Redirect HTTP to HTTPS
"urlprefix-leptonic.dev:80/ redirect=301,https://leptonic.dev/",
# Serve the app using delayed SSL termination
"urlprefix-leptonic.dev/ proto=https tlsskipverify=true",
]
port = "https"
check {
type = "tcp"
interval = "10s"
timeout = "2s"
}
}
}
}
}