Initial commit: Erika CV site with Nomad deployment
Some checks failed
Build and Deploy Erika CV / build-and-deploy (push) Failing after 10s
Some checks failed
Build and Deploy Erika CV / build-and-deploy (push) Failing after 10s
This commit is contained in:
95
erika.nomad
Normal file
95
erika.nomad
Normal file
@@ -0,0 +1,95 @@
|
||||
job "web-erika" {
|
||||
region = "global"
|
||||
datacenters = ["dc1"]
|
||||
type = "service"
|
||||
|
||||
meta {
|
||||
uuid = uuidv4()
|
||||
deployed_at = "[[ timeNowUTC ]]"
|
||||
}
|
||||
|
||||
update {
|
||||
stagger = "30s"
|
||||
max_parallel = 1
|
||||
canary = 1
|
||||
min_healthy_time = "10s"
|
||||
healthy_deadline = "5m"
|
||||
auto_revert = true
|
||||
auto_promote = true
|
||||
progress_deadline = "10m"
|
||||
}
|
||||
|
||||
group "web" {
|
||||
count = 1
|
||||
|
||||
network {
|
||||
port "http" {}
|
||||
}
|
||||
|
||||
reschedule {
|
||||
attempts = 5
|
||||
interval = "10m"
|
||||
delay = "30s"
|
||||
delay_function = "exponential"
|
||||
max_delay = "120s"
|
||||
unlimited = false
|
||||
}
|
||||
|
||||
service {
|
||||
provider = "consul"
|
||||
name = "erika"
|
||||
port = "http"
|
||||
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.erika.rule=Host(`erika.i80.dk`)",
|
||||
"traefik.http.routers.erika.tls=true"
|
||||
]
|
||||
|
||||
canary_tags = [
|
||||
"traefik.enable=false"
|
||||
]
|
||||
|
||||
check {
|
||||
name = "http_health_check"
|
||||
type = "http"
|
||||
path = "/health"
|
||||
interval = "10s"
|
||||
timeout = "5s"
|
||||
|
||||
check_restart {
|
||||
limit = 3
|
||||
grace = "10s"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task "web" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
image = "registry.i80.dk/gitea/web-erika:latest"
|
||||
ports = ["http"]
|
||||
force_pull = true
|
||||
}
|
||||
|
||||
restart {
|
||||
attempts = 10
|
||||
interval = "10m"
|
||||
delay = "10s"
|
||||
mode = "fail"
|
||||
}
|
||||
|
||||
env {
|
||||
APP_ENV = "production"
|
||||
PORT = "${NOMAD_PORT_http}"
|
||||
HOST = "0.0.0.0"
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 100
|
||||
memory = 128
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user