From 1a4d434d5b2367ad5fd9b88542f9b0c04a03dcab Mon Sep 17 00:00:00 2001 From: Adrian Cowan Date: Sat, 3 May 2025 18:00:30 +1000 Subject: [PATCH] Change from basic auth to authelia --- 2-nomad-config/authelia.nomad.hcl | 101 ++++++++++++++++++++ 2-nomad-config/glance.nomad.hcl | 1 + 2-nomad-config/hello-world.nomad.hcl | 1 + 2-nomad-config/services.tf | 4 + 2-nomad-config/terraform.tfstate | 81 +++++++++++++--- 2-nomad-config/terraform.tfstate.backup | 120 ++++++++++++++++++++---- 2-nomad-config/traefik.nomad.hcl | 24 +++-- 2-nomad-config/volume-test.nomad.hcl | 1 + 2-nomad-config/webapp.nomad.hcl | 1 + 9 files changed, 298 insertions(+), 36 deletions(-) create mode 100644 2-nomad-config/authelia.nomad.hcl diff --git a/2-nomad-config/authelia.nomad.hcl b/2-nomad-config/authelia.nomad.hcl new file mode 100644 index 0000000..00062ef --- /dev/null +++ b/2-nomad-config/authelia.nomad.hcl @@ -0,0 +1,101 @@ +job "authelia" { + group "authelia" { + network { + port "http" { + static = 9091 + } + } + + service { + name = "auth" + port = "http" + + tags = [ + "traefik.enable=true", + ] + + check { + type = "http" + path = "/health" + interval = "10s" + timeout = "2s" + } + } + + task "authelia" { + driver = "docker" + + config { + image = "authelia/authelia:latest" + + ports = ["http"] + + volumes = [ + "local/config:/config", + "local/data:/data" # TODO: Move this to a volume + ] + } + + resources { + cpu = 100 + memory = 128 + } + + template { + data = <