This repository has been archived by the owner on Jul 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
job.hcl.tpl
105 lines (89 loc) · 1.93 KB
/
job.hcl.tpl
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
103
104
105
job "wbld" {
datacenters = ["sheraton"]
update {
max_parallel = 0
}
group "server" {
meta {
commit = "${commit}"
}
network {
port "http" {
static = 8092
to = 8090
}
}
task "bot" {
driver = "docker"
config {
image = "${image}"
command = "python3"
force_pull = true
args = ["-m", "wbld.bot"]
auth {
username = "andyshinn"
password = "${github_token}"
server_address = "ghcr.io"
}
mounts = [
{
type = "volume"
target = "/root/.platformio"
source = "wbld_platformio"
},
{
type = "volume"
target = "/root/.buildcache"
source = "wbld_buildcache"
},
{
type = "volume"
target = "/root/wbld"
source = "wbld_data"
}
]
}
resources {
cpu = 2000
memory = 2048
}
env {
DISCORD_TOKEN = "${discord_token}"
SENTRY_DSN = "${sentry_dsn}"
PING_URL = "${ping_url}"
STORAGE_DIR = "/root/wbld"
}
}
task "web" {
driver = "docker"
config {
image = "${image}"
command = "python3"
force_pull = true
args = ["-m", "wbld.web"]
auth {
username = "andyshinn"
password = "${github_token}"
server_address = "ghcr.io"
}
mounts = [
{
type = "volume"
target = "/root/wbld"
source = "wbld_data"
}
]
ports = ["http"]
}
resources {
cpu = 1000
memory = 1024
}
env {
SENTRY_DSN = "${sentry_dsn}"
STORAGE_DIR = "/root/wbld"
DEFAULT_BRANCH = "main"
}
}
}
}