hashi-stack/nomad/jobs/python-app.nomad

53 lines
819 B
Plaintext
Raw Normal View History

2020-05-19 06:37:21 +02:00
job "docker-app" {
region = "global"
datacenters = [
"dc1"]
type = "service"
group "server" {
count = 1
task "docker-app" {
driver = "docker"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
config {
image = "anguda/python-flask-app:latest"
port_map {
python_server = 5000
}
}
service {
name = "docker-app"
port = "python_server"
tags = [
"docker",
"app"]
check {
type = "http"
path = "/test"
interval = "10s"
timeout = "2s"
}
}
resources {
memory = 256
network {
mbits = 20
port "python_server" {
}
}
}
}
}
}