chore(jayne-martin-counselling): onboarding
All checks were successful
Lint / lint (push) Successful in 2m5s
Terraform Plan and Apply / cicd (push) Successful in 1m35s

This commit is contained in:
Ben Martin 2025-03-29 20:45:15 +00:00
parent f8e9e5653e
commit b25f382f4c
Signed by: ben
GPG key ID: 859A655FCD290E4A
3 changed files with 97 additions and 0 deletions

View file

@ -45,3 +45,7 @@ module "keycloak" {
module "ollama" { module "ollama" {
source = "./modules/ollama" source = "./modules/ollama"
} }
module "jayne-martin-counselling" {
source = "./modules/jayne-martin-counselling"
}

View file

@ -0,0 +1,90 @@
job "jayne-martin-counselling" {
namespace = "jaynemartincounselling-prod"
group "webserver" {
network {
mode = "bridge"
port "http" {
to = 80
}
port "envoy_metrics" {
to = 9102
}
}
task "webserver" {
driver = "docker"
config {
image = "git.brmartin.co.uk/jayne-martin-counselling/website:latest"
}
resources {
cpu = 10
memory = 32
}
}
service {
provider = "consul"
port = 80
meta {
envoy_metrics_port = "${NOMAD_HOST_PORT_envoy_metrics}"
}
connect {
sidecar_service {
proxy {
expose {
path {
path = "/metrics"
protocol = "http"
local_path_port = 9102
listener_port = "envoy_metrics"
}
}
transparent_proxy {}
}
}
}
}
}
group "webserver-ingress-group" {
network {
mode = "bridge"
port "inbound" {
to = 8080
}
}
service {
port = "inbound"
tags = [
"traefik.enable=true",
"traefik.http.routers.jmc.rule=Host(`www.jaynemartincounselling.co.uk`)",
"traefik.http.routers.jmc.entrypoints=websecure"
]
connect {
gateway {
ingress {
listener {
port = 8080
protocol = "http"
service {
name = "jayne-martin-counselling-webserver"
hosts = ["*"]
}
}
}
}
}
}
}
}

View file

@ -0,0 +1,3 @@
resource "nomad_job" "jayne-martin-counselling" {
jobspec = file("${path.module}/jobspec.nomad.hcl")
}