diff --git a/apps/homer/live.hcl b/apps/homer/live.hcl new file mode 100644 index 0000000..49e82d6 --- /dev/null +++ b/apps/homer/live.hcl @@ -0,0 +1,50 @@ +job "homer" { + datacenters = ["nummer5"] + + group "apps" { + count = 1 + + network { + port "http"{ + to = 8080 + } + } + + service { + name = "homer" + port = "http" + + tags = [ + "traefik.enable=true", + "traefik.http.routers.http.rule=Host(`homer.service.nr5`)", + ] + + } + + volume "homer-assets" { + type = "csi" + read_only = false + source = "homer-assets" + access_mode = "single-node-writer" + attachment_mode = "file-system" + } + + task "homer" { + driver = "podman" + + config { + image = "b4bz/homer:latest" + ports = ["http"] + } + + volume_mount { + volume = "homer-assets" + destination = "/www/assets" + } + } + resources { + cpu = 10 + memory = 32 + } + } +} diff --git a/apps/homer/volume.hcl b/apps/homer/volume.hcl new file mode 100644 index 0000000..2cd7ba5 --- /dev/null +++ b/apps/homer/volume.hcl @@ -0,0 +1,20 @@ +type = "csi" +id = "homer-assets" +name = "homer-assets" +plugin_id = "nfs" + +capability { + access_mode = "single-node-writer" + attachment_mode = "file-system" +} + +context { + server = "ebin01.wks" + share = "/data/raid1-ssd/app-data/homer-assets" + mountPermissions = "0" +} + +mount_options { + fs_type = "nfs" + mount_flags = [ "timeo=30", "vers=3", "_netdev" , "nolock" ] +} \ No newline at end of file