-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.nomad
68 lines (57 loc) · 1.73 KB
/
template.nomad
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
job "lure-updater" {
region = "global"
datacenters = ["dc1"]
type = "service"
group "lure-updater" {
network {
port "webhook" {
to = 8080
}
}
volume "lure-updater-data" {
type = "host"
source = "lure-updater-data"
read_only = false
}
task "lure-updater" {
driver = "docker"
volume_mount {
volume = "lure-updater-data"
destination = "/etc/lure-updater"
read_only = false
}
env {
GIT_REPO_DIR = "/etc/lure-updater/repo"
GIT_REPO_URL = "https://github.com/lure-sh/lure-repo.git"
GIT_CREDENTIALS_USERNAME = "lure-repo-bot"
GIT_CREDENTIALS_PASSWORD = "${GITHUB_PASSWORD}"
GIT_COMMIT_NAME = "lure-repo-bot"
GIT_COMMIT_EMAIL = "lure@elara.ws"
WEBHOOK_PASSWORD_HASH = "${PASSWORD_HASH}"
// Hack to force Nomad to re-deploy the service
// instead of ignoring it
COMMIT_SHA = "${DRONE_COMMIT_SHA}"
}
config {
image = "alpine:latest"
command = "/opt/lure-updater/lure-updater"
args = ["-DE"]
ports = ["webhook"]
volumes = ["local/lure-updater/:/opt/lure-updater:ro"]
}
artifact {
source = "https://api.minio.elara.ws/lure-updater/lure-updater-$${attr.cpu.arch}.tar.gz"
destination = "local/lure-updater"
}
service {
name = "lure-updater"
port = "webhook"
tags = [
"traefik.enable=true",
"traefik.http.routers.lure-updater.rule=Host(`updater.lure.sh`)",
"traefik.http.routers.lure-updater.tls.certResolver=letsencrypt",
]
}
}
}
}