Skip to content

Commit 96fd227

Browse files
committed
add nomad job
1 parent 3d12d10 commit 96fd227

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

chuko.nomad

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
job "chuko" {
2+
datacenters = ["dc1"]
3+
type = "service"
4+
5+
group "chuko" {
6+
count = 1
7+
8+
network {
9+
port "http" {
10+
to = 4000
11+
}
12+
}
13+
14+
service {
15+
name = "chuko"
16+
port = "http"
17+
provider = "nomad"
18+
19+
tags = [
20+
"traefik.enable=true",
21+
"traefik.http.routers.chuko.rule=Host(`chuko.gay`)",
22+
"traefik.http.routers.chuko.tls=true",
23+
"traefik.http.routers.chuko.tls.certresolver=letsencrypt"
24+
]
25+
}
26+
27+
task "chuko" {
28+
driver = "docker"
29+
30+
config {
31+
image = "ghcr.io/okkdev/chuko"
32+
ports = ["http"]
33+
}
34+
35+
env {
36+
// Generate a new one with `mix phx.gen.secret`
37+
SECRET_KEY_BASE = "1Lvd0uSlGOblVBx6es3UFyCLxQPh45Vi+VBEbYyIb8D4LEv70VGT+RNK6V2RxYRn"
38+
PHX_HOST = "chuko.gay"
39+
DATABASE_PATH = "/app/chuko.db"
40+
}
41+
42+
resources {
43+
cpu = 1000
44+
memory = 1000
45+
}
46+
}
47+
}
48+
}

0 commit comments

Comments
 (0)