chore(jayne-martin-counselling): onboarding
This commit is contained in:
parent
f8e9e5653e
commit
b25f382f4c
3 changed files with 97 additions and 0 deletions
4
main.tf
4
main.tf
|
@ -45,3 +45,7 @@ module "keycloak" {
|
|||
module "ollama" {
|
||||
source = "./modules/ollama"
|
||||
}
|
||||
|
||||
module "jayne-martin-counselling" {
|
||||
source = "./modules/jayne-martin-counselling"
|
||||
}
|
||||
|
|
90
modules/jayne-martin-counselling/jobspec.nomad.hcl
Normal file
90
modules/jayne-martin-counselling/jobspec.nomad.hcl
Normal 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 = ["*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
3
modules/jayne-martin-counselling/main.tf
Normal file
3
modules/jayne-martin-counselling/main.tf
Normal file
|
@ -0,0 +1,3 @@
|
|||
resource "nomad_job" "jayne-martin-counselling" {
|
||||
jobspec = file("${path.module}/jobspec.nomad.hcl")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue