-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjob.nomad.hcl
55 lines (48 loc) · 1.12 KB
/
job.nomad.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
job "zfinger" {
type = "service"
group "zfinger" {
network {
port "http" {
to = 5000
}
}
service {
name = "zfinger"
port = "http"
provider = "nomad"
tags = [
"traefik.enable=true",
"traefik.http.routers.zfinger.rule=Host(`zfinger.datasektionen.se`)",
"traefik.http.routers.zfinger.tls.certresolver=default",
]
}
task "zfinger" {
driver = "docker"
config {
image = var.image_tag
ports = ["http"]
}
template {
data = <<ENV
{{ with nomadVar "nomad/jobs/zfinger" }}
AWS_SECRET_ACCESS_KEY={{ .aws_secret_access_key }}
LOGIN_API_KEY={{ .login_api_key }}
{{ end }}
AWS_ACCESS_KEY_ID=AKIATUCF4UAO3OIEOFJA
LOGIN_FRONTEND_URL=https://sso.datasektionen.se/legacyapi
LOGIN_API_URL=http://sso.nomad.dsekt.internal/legacyapi
HODIS_HOST=https://hodis.datasektionen.se
ENV
destination = "local/.env"
env = true
}
resources {
memory = 150
}
}
}
}
variable "image_tag" {
type = string
default = "ghcr.io/datasektionen/zfinger:latest"
}