Skip to content

Commit

Permalink
add nomad job
Browse files Browse the repository at this point in the history
  • Loading branch information
okkdev committed Dec 23, 2022
1 parent 3d12d10 commit 96fd227
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions chuko.nomad
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
job "chuko" {
datacenters = ["dc1"]
type = "service"

group "chuko" {
count = 1

network {
port "http" {
to = 4000
}
}

service {
name = "chuko"
port = "http"
provider = "nomad"

tags = [
"traefik.enable=true",
"traefik.http.routers.chuko.rule=Host(`chuko.gay`)",
"traefik.http.routers.chuko.tls=true",
"traefik.http.routers.chuko.tls.certresolver=letsencrypt"
]
}

task "chuko" {
driver = "docker"

config {
image = "ghcr.io/okkdev/chuko"
ports = ["http"]
}

env {
// Generate a new one with `mix phx.gen.secret`
SECRET_KEY_BASE = "1Lvd0uSlGOblVBx6es3UFyCLxQPh45Vi+VBEbYyIb8D4LEv70VGT+RNK6V2RxYRn"
PHX_HOST = "chuko.gay"
DATABASE_PATH = "/app/chuko.db"
}

resources {
cpu = 1000
memory = 1000
}
}
}
}

0 comments on commit 96fd227

Please sign in to comment.