thelounge.nomad (1994B)
1 # https://github.com/thelounge/thelounge-docker/blob/master/docker-compose.yml 2 # https://thelounge.chat/docs/install-and-upgrade#docker 3 4 job "thelounge" { 5 datacenters = ["dc1"] 6 7 vault {} 8 9 group "server" { 10 count = 1 11 12 volume "tls" { 13 type = "csi" 14 source = "certbot" 15 access_mode = "multi-node-multi-writer" 16 attachment_mode = "file-system" 17 } 18 volume "thelounge" { 19 type = "csi" 20 source = "thelounge" 21 access_mode = "multi-node-multi-writer" 22 attachment_mode = "file-system" 23 } 24 25 network { 26 port "http" { 27 to = 9000 28 } 29 port "https" { 30 static = 44412 31 } 32 } 33 34 task "nginx" { 35 driver = "podman" 36 37 config { 38 image = "docker.io/library/nginx:stable-alpine" 39 ports = ["https"] 40 volumes = [ 41 # mount the templated config from the task directory to the container 42 "local/thelounge.conf:/etc/nginx/conf.d/thelounge.conf", 43 ] 44 } 45 46 volume_mount { 47 volume = "tls" 48 destination = "/etc/letsencrypt" 49 } 50 51 template { 52 destination = "${NOMAD_TASK_DIR}/thelounge.conf" 53 data = file("./templates/nginx.conf.tmpl") 54 } 55 56 resources { 57 memory = 50 58 memory_max = 256 59 cpu = 200 60 } 61 } 62 63 task "thelounge" { 64 driver = "podman" 65 66 config { 67 image = "ghcr.io/thelounge/thelounge:latest" 68 force_pull = true 69 ports = ["http"] 70 volumes = [ 71 # mount the templated config from the task directory to the container 72 "local/config.js:/var/opt/thelounge/config.js", 73 ] 74 } 75 76 volume_mount { 77 volume = "thelounge" 78 destination = "/var/opt/thelounge" 79 } 80 81 template { 82 destination = "${NOMAD_TASK_DIR}/config.js" 83 data = file("./templates/config.js.tmpl") 84 } 85 86 resources { 87 memory = 512 88 memory_max = 1024 89 cpu = 500 90 } 91 } 92 } 93 }