Add HashiCorp deployment
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# Simple test service to verify Traefik + Consul integration
|
||||
# Deploy: nomad job run whoami.nomad.hcl
|
||||
|
||||
job "whoami" {
|
||||
datacenters = ["hf-dc1"]
|
||||
type = "service"
|
||||
|
||||
group "whoami" {
|
||||
count = 2 # Run 2 instances for load balancing demo
|
||||
|
||||
network {
|
||||
port "http" {
|
||||
to = 80
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
name = "whoami"
|
||||
port = "http"
|
||||
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.whoami.rule=Host(`whoami.hobbs.farm`)",
|
||||
"traefik.http.routers.whoami.entrypoints=websecure",
|
||||
"traefik.http.routers.whoami.tls.certresolver=letsencrypt",
|
||||
]
|
||||
|
||||
check {
|
||||
type = "http"
|
||||
path = "/health"
|
||||
interval = "10s"
|
||||
timeout = "2s"
|
||||
}
|
||||
}
|
||||
|
||||
task "whoami" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
image = "traefik/whoami:latest"
|
||||
ports = ["http"]
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 50
|
||||
memory = 32
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user