-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaleff-service-job.hcl
103 lines (83 loc) · 2.03 KB
/
aleff-service-job.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
job "aleff" {
datacenters = ["dc1"]
group "processor" {
# Only one instance of aleff can run at once.
count = 1
ephemeral_disk {
size = 10
}
task "processor" {
driver = "docker"
config {
image = "stut/aleff:latest"
force_pull = true
}
env {
# How frequently to check for new domains and pending renewals.
RUN_INTERVAL = "24h"
# Location of the challenge responder job definition file (see template below).
CHALLENGE_RESPONDER_JOB_FILENAME = "local/challenge-responder.hcl"
# Requires access to both Nomad and Consul so set up any URLs, tokens, etc in the environment.
NOMAD_ADDR = "http://127.0.0.1:4646"
CONSUL_HTTP_ADDR = "http://127.0.0.1:8500"
}
resources {
cpu = 8
memory = 16
}
logs {
max_files = 1
max_file_size = 5
}
template {
destination = "local/challenge-responder.hcl"
data = <<EOH
job "aleff-challenge-responder" {
datacenters = ["dc1"]
group "responder" {
count = 1
network {
port "http" {}
}
ephemeral_disk {
size = 10
}
task "server" {
driver = "docker"
config {
image = "stut/aleff-challenge-responder:latest"
force_pull = true
ports = ["http"]
}
env {
# Requires access to Consul so set up any URLs, tokens, etc in the environment.
CONSUL_HTTP_ADDR = "http://127.0.0.1:8500"
}
resources {
cpu = 8
memory = 16
}
logs {
max_files = 1
max_file_size = 5
}
service {
# The necessary urlprefix- tag will be added by aleff before deploying this service.
tags = []
port = "http"
check {
type = "http"
port = "http"
path = "/.well-known/acme-challenge/health"
interval = "10s"
timeout = "2s"
}
}
}
}
}
EOH
}
}
}
}