Last active
January 23, 2019 07:49
-
-
Save ThomasObenaus/d126921005691e9a79201e225fdc6bf1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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