Skip to content

Instantly share code, notes, and snippets.

@eveld
Created July 21, 2020 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eveld/e897f7385168bbf250122104390fd5f7 to your computer and use it in GitHub Desktop.
Save eveld/e897f7385168bbf250122104390fd5f7 to your computer and use it in GitHub Desktop.
job "api" {
datacenters = ["dc1"]
type = "service"
group "api" {
count = 3
network {
mode = "bridge"
}
task "api" {
driver = "docker"
config {
image = "nicholasjackson/fake-service:v0.14.1"
}
env {
NAME = "api (${NOMAD_ALLOC_ID})"
MESSAGE = "ok"
LISTEN_ADDR = "0.0.0.0:9090"
}
resources {
cpu = 50
memory = 64
}
}
}
}
data_dir = "/etc/nomad.d/data"
client {
enabled = true
server_join {
retry_join = ["server.dc1.nomad_cluster.shipyard.run"]
}
# Also tried it without this..no luck
network_interface = "eth0"
}
plugin "raw_exec" {
config {
enabled = true
}
}
data_dir = "/etc/nomad.d/data"
server {
enabled = true
bootstrap_expect = 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment