-
Notifications
You must be signed in to change notification settings - Fork 0
/
shlink.hcl
54 lines (46 loc) · 1.03 KB
/
shlink.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
job "shlink" {
datacenters = ["dc1"]
type = "service"
group "web" {
network {
port "http" {
to = 8080
}
}
service {
name = "shlink"
port = "http"
tags = [
"traefik.enable=true",
"traefik.port=${NOMAD_PORT_http}",
"traefik.http.routers.shlink.rule=Host(`s.dbyte.xyz`)",
"traefik.http.routers.shlink.tls=true",
"traefik.http.routers.shlink.tls.certresolver=lets-encrypt",
]
}
task "shlink" {
driver = "docker"
config {
image = "shlinkio/shlink"
ports = ["http"]
}
template {
data = <<EOH
DEFAULT_DOMAIN=s.dbyte.xyz
IS_HTTPS_ENABLED=true
DB_DRIVER=postgres
DB_USER={{ key "shlink/db/user" }}
DB_PASSWORD={{ key "shlink/db/pass" }}
DB_NAME={{ key "shlink/db/name" }}
DB_HOST=postgresql.service.consul
GEOLITE_LICENSE_KEY={{ key "shlink/geolite/key" }}
EOH
destination = "local/file.env"
env = true
}
resources {
memory = 500 # 6gb
}
}
}
}