Add Christmas list service

This commit is contained in:
IamTheFij 2024-12-17 16:31:43 -08:00
parent b6605aa8bc
commit 4a10b97749
3 changed files with 49 additions and 0 deletions

View File

@ -140,6 +140,9 @@
- name: ytdl-web - name: ytdl-web
path: /srv/volumes/nas-container/ytdl-web path: /srv/volumes/nas-container/ytdl-web
read_only: false read_only: false
- name: christmas-community
path: /srv/volumes/nas-container/christmas-community
read_only: false
- name: all-volumes - name: all-volumes
path: /srv/volumes path: /srv/volumes
owner: "root" owner: "root"

View File

@ -140,6 +140,8 @@ nomad/jobs/traefik:
nomad/jobs/unifi-traffic-route-ips: nomad/jobs/unifi-traffic-route-ips:
unifi_password: VALUE unifi_password: VALUE
unifi_username: VALUE unifi_username: VALUE
nomad/jobs/wishlist:
guest_password: VALUE
nomad/oidc: nomad/oidc:
secret: VALUE secret: VALUE
secrets/ldap: secrets/ldap:

View File

@ -0,0 +1,44 @@
module "wishlist" {
source = "./service"
name = "wishlist"
image = "wingysam/christmas-community:latest"
ingress = true
service_port = 80
use_wesher = var.use_wesher
host_volumes = [
{
name = "christmas-community"
dest = "/data"
read_only = false
},
]
templates = [
{
data = <<EOF
{{ with nomadVar "nomad/jobs/wishlist" -}}
GUEST_PASSWORD={{ .guest_password }}
{{ end -}}
{{ with nomadService "traefik" -}}
{{- $last := len . | subtract 1 -}}
{{- $services := . -}}
TRUST_PROXY={{ range $i := loop $last -}}
{{- with index $services $i }}{{ .Address }},{{ end -}}
{{- end -}}
{{- with index . $last }}{{ .Address }}{{ end -}}
{{- end }}
EOF
dest = "env"
dest_prefix = "$${NOMAD_SECRETS_DIR}/"
env = true
},
]
resources = {
cpu = 100
memory = 200
}
}