Skip to content

Instantly share code, notes, and snippets.

@ThomasObenaus
Last active January 23, 2019 07:49
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 ThomasObenaus/d126921005691e9a79201e225fdc6bf1 to your computer and use it in GitHub Desktop.
Save ThomasObenaus/d126921005691e9a79201e225fdc6bf1 to your computer and use it in GitHub Desktop.
job "fail-service" {
datacenters = ["public-services"]
type = "service"
group "fail-service" {
count = 1
task "fail-service" {
driver = "docker"
config {
image = "thobe/fail_service:v0.0.12"
port_map = {
http = 8080
}
}
service {
name = "${TASK}"
port = "http"
tags = ["urlprefix-/fail-service strip=/fail-service"] # fabio
check {
name = "fail_service health using http endpoint '/health'"
port = "http"
type = "http"
path = "/health"
method = "GET"
interval = "10s"
timeout = "2s"
}
}
env {
HEALTHY_FOR = 30, # stays healthy for 30s
UNHEALTHY_FOR = -1, # gets unhealthy afterwards
}
resources {
cpu = 100 # MHz
memory = 256 # MB
network {
mbits = 10
port "http" {}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment