-
Notifications
You must be signed in to change notification settings - Fork 0
/
job.nomad.hcl
61 lines (53 loc) · 1.51 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
56
57
58
59
60
61
job "calypso" {
type = "service"
group "calypso" {
network {
port "http" { }
}
service {
name = "calypso"
port = "http"
provider = "nomad"
tags = [
"traefik.enable=true",
"traefik.http.routers.calypso.rule=Host(`calypso.datasektionen.se`)",
"traefik.http.routers.calypso.tls.certresolver=default",
"traefik.enable=true",
"traefik.http.routers.calypso-internal.rule=Host(`calypso.nomad.dsekt.internal`)",
"traefik.http.routers.calypso-internal.entrypoints=web-internal",
]
}
task "calypso" {
driver = "docker"
config {
image = var.image_tag
ports = ["http"]
}
template {
data = <<ENV
{{ with nomadVar "nomad/jobs/calypso" }}
LOGIN_KEY={{ .login_api_key }}
JDBC_DATABASE_PASSWORD={{ .database_password }}
{{ end }}
JDBC_DATABASE_URL=jdbc:postgresql://postgres.dsekt.internal:5432/calypso
JDBC_DATABASE_USERNAME=calypso
LOGIN_FRONTEND_URL=https://login.datasektionen.se
LOGIN_API_URL=https://login.datasektionen.se
APPLICATION_URL=https://calypso.datasektionen.se
DARKMODE_URL=https://darkmode.datasektionen.se
PORT={{ env "NOMAD_PORT_http" }}
ENV
destination = "local/.env"
env = true
}
# My god, that's a lot of RAM! (seems to be using about 250MiB idle at the time of writing)
resources {
memory = 500
}
}
}
}
variable "image_tag" {
type = string
default = "ghcr.io/datasektionen/calypso:latest"
}