Nomad stuff
Some checks are pending
Build, Push, and Deploy to Nomad / docker-nomad (push) Waiting to run

This commit is contained in:
Henrik Jess Nielsen
2025-10-05 15:53:10 +02:00
parent 6e97805eea
commit 0747579dcf
9 changed files with 0 additions and 0 deletions

61
Depriced/nomad-blue.hcl Normal file
View File

@@ -0,0 +1,61 @@
job "lifefaq-blue" {
region = "global"
datacenters = ["dc1"]
type = "service"
update {
stagger = "60s"
max_parallel = 1
progress_deadline = "6m"
}
group "lifefaq-blue-group" {
count = 1
network {
port "port-app" {
to = 9210 # Internal application port
}
}
# Register the service with Consul
service {
provider = "consul"
name = "lifefaq-blue"
port = "port-app"
# Traefik-specific tags for routing
tags = [
"PORT=${NOMAD_PORT_port-app}"
]
# Define a health check using TCP
check {
name = "tcp_check"
type = "tcp"
interval = "10s"
timeout = "2s"
}
}
task "lifefaq-blue-task" {
driver = "docker"
config {
image = "registry.i80.dk/gitea/lifefaq:latest"
ports = ["port-app"]
}
env {
APP_ENV = "production"
PORT = "${NOMAD_PORT_port-app}"
}
resources {
cpu = 250
memory = 80
}
}
}
}