Skip to content

Commit

Permalink
🔧 Add nomad job file
Browse files Browse the repository at this point in the history
  • Loading branch information
GiyoMoon committed Jul 7, 2022
1 parent 19c9db5 commit d957a1e
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions stats.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
job "witchtrade-stats" {
datacenters = ["dc1"]
type = "service"

group "witchtrade" {
count = 1

service {
name = "witchtrade-stats"
provider = "nomad"
}

task "server" {
driver = "docker"

resources {
cpu = 300
memory = 300
}

template {
data = <<EOH
{{ range nomadService "witchtrade-db" }}
DATABASEHOST="{{ .Address }}"
STATS_DATABASEHOST="{{ .Address }}"
{{ end }}
EOH
destination = "/env.env"
env = true
}

env {
DATABASEUSER = "USER"
DATABASEPORT = "5432"
DATABASEPW = "PASSWORD"
STEAMMASTERSERVER = "hl2master.steampowered.com:27011"
WITCHITAPPID = "559650"
}

config {
image = "ghcr.io/witchtrade/witchitsrvstats"
}
}
}
}

0 comments on commit d957a1e

Please sign in to comment.