Full document, spreadsheet, slideshow, and diagram tooling
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: use Nix-generated Nomad job from homelab-nix instead of hand-written HCL

The homelab-nix repo is the single source of truth for all Nomad service
definitions via mkService. Remove the hand-written HCL and switch the
deploy step to use deploy-nomad-service without a job-file, which
evaluates the Nix expression from homelab-nix.

-132
-132
deploy/atmosphere-docs.nomad.hcl
··· 1 - job "atmosphere-docs" { 2 - type = "service" 3 - datacenters = ["homelab"] 4 - priority = 50 5 - 6 - constraint { 7 - attribute = "${node.unique.name}" 8 - operator = "=" 9 - value = "big-nix" 10 - } 11 - 12 - update { 13 - max_parallel = 1 14 - min_healthy_time = "30s" 15 - healthy_deadline = "5m" 16 - auto_revert = true 17 - } 18 - 19 - group "atmosphere-docs" { 20 - count = 1 21 - 22 - network { 23 - mode = "bridge" 24 - port "http" { 25 - to = 8080 26 - } 27 - } 28 - 29 - volume "tailscale-atmosphere-docs" { 30 - type = "host" 31 - source = "tailscale-atmosphere-docs" 32 - read_only = false 33 - } 34 - 35 - restart { 36 - attempts = 3 37 - interval = "30m" 38 - delay = "15s" 39 - mode = "fail" 40 - } 41 - 42 - reschedule { 43 - delay = "30s" 44 - delay_function = "exponential" 45 - max_delay = "1h" 46 - unlimited = true 47 - } 48 - 49 - ephemeral_disk { 50 - size = 300 51 - } 52 - 53 - service { 54 - provider = "nomad" 55 - name = "atmosphere-docs" 56 - port = "http" 57 - 58 - check { 59 - type = "http" 60 - path = "/" 61 - interval = "30s" 62 - timeout = "5s" 63 - } 64 - } 65 - 66 - task "tailscale" { 67 - driver = "docker" 68 - 69 - lifecycle { 70 - hook = "prestart" 71 - sidecar = true 72 - } 73 - 74 - config { 75 - image = "gitea.lobster-hake.ts.net/lanos-familia/tailscale-proxy:1.94.1-r8" 76 - privileged = true 77 - } 78 - 79 - env { 80 - TS_HOSTNAME = "atmosphere-docs" 81 - TS_SERVE_PORT = "8080" 82 - TS_TAGS = "tag:server" 83 - } 84 - 85 - resources { 86 - cpu = 50 87 - memory = 256 88 - } 89 - 90 - volume_mount { 91 - volume = "tailscale-atmosphere-docs" 92 - destination = "/var/lib/tailscale" 93 - read_only = false 94 - } 95 - 96 - template { 97 - data = <<-EOT 98 - {{ with nomadVar "nomad/jobs/atmosphere-docs" }} 99 - TS_AUTHKEY={{ .ts_authkey }} 100 - {{ end }} 101 - EOT 102 - destination = "secrets/tailscale.env" 103 - env = true 104 - } 105 - 106 - template { 107 - data = <<-EOT 108 - {{ with nomadVar "nomad/jobs/ts-oauth" }} 109 - TS_OAUTH_CLIENT_ID={{ .ts_oauth_client_id }} 110 - TS_OAUTH_CLIENT_SECRET={{ .ts_oauth_client_secret }} 111 - {{ end }} 112 - EOT 113 - destination = "secrets/ts-oauth.env" 114 - env = true 115 - } 116 - } 117 - 118 - task "atmosphere-docs" { 119 - driver = "docker" 120 - 121 - config { 122 - image = "gitea.lobster-hake.ts.net/lanos-familia/atmosphere-docs:latest" 123 - force_pull = true 124 - } 125 - 126 - resources { 127 - cpu = 200 128 - memory = 128 129 - } 130 - } 131 - } 132 - }