job "gonic" { datacenters = ["dc1"] type = "service" group "gonic" { count = 1 volume "gonic-csi-vol" { type = "csi" source = "gonic-volume" attachment_mode = "file-system" access_mode = "multi-node-multi-writer" } task "gonic" { driver = "docker" volume_mount { volume = "gonic-csi-vol" # Matches the name in the volume block above destination = "/data" # Where it appears inside the container read_only = false } config { image = "sentriz/gonic" port_map { http = 80 } volumes = [ "/mnt/configs/gonic/cache:/cache", "/mnt/Public/Downloads/Clean_Music:/music/CleanMusic:ro", "/mnt/Public/Downloads/incoming_music:/music/incomingmusic:ro", "/mnt/Public/Downloads/podcasts:/podcasts", "/mnt/Public/Downloads/musicplaylists:/musicplaylists", ] } env{ GONIC_SCAN_INTERVAL = "120" GONIC_MUSIC_PATH = "/music" GONIC_PODCAST_PATH = "/podcasts" GONIC_PLAYLISTS_PATH = "/musicplaylists" } resources { cpu = 100 # 100 MHz memory = 256 # 128 MB network { port "http" { static = "4747" } } } service { name = "gonic" tags = [ "gonic", "web", "urlprefix-/gonic", "backend", "traefik.http.routers.goniclan.rule=Host(`gonic.service.dc1.consul`)", "traefik.http.routers.gonicwan.rule=Host(`mg.fbleagh.duckdns.org`)", "traefik.http.routers.gonicwan.tls=true", ] // "traefik.http.middlewares.gonic_auth.basicauth.users=admin:$2y$05$cJGONoS0BFTeBUXqmETikeI14QhLDKIDkYuPdA1umIOC129grVMAm", port = "http" meta { ALLOC = "${NOMAD_ALLOC_ID}" } check { type = "tcp" interval = "10s" timeout = "2s" } } } #end gonic } }