diff --git a/apps/netbox/live.hcl b/apps/netbox/live.hcl new file mode 100644 index 0000000..8b6f73d --- /dev/null +++ b/apps/netbox/live.hcl @@ -0,0 +1,72 @@ +job "netbox" { + datacenters = [ + "nummer5", + ] + type = "service" + + group "apps" { + count = 1 + + network { + port "http" { + to = 8000 + } + } + + service { + name = "netbox" + port = "http" + + tags = [ + "traefik.enable=true", + "traefik.http.routers.netbox.rule=Host(`netbox.service.nr5`)", + ] + } + + volume "netbox" { + type = "csi" + source = "netbox" + read_only = false + access_mode = "single-node-writer" + attachment_mode = "file-system" + } + + restart { + attempts = 5 + delay = "60s" + } + + task "netbox" { + driver = "podman" + volume_mount { + volume = "netbox" + destination = "/config" + read_only = false + } + + config { + image = "docker.io/netboxcommunity/netbox" + ports = ["http"] + } + env { + TZ="Europe/Berlin" + SUPERUSER_EMAIL="udo@maketank.net" + SUPERUSER_PASSWORD="superu" + ALLOWED_HOST="netbox.service.nr5" + DB_WAIT_DEBUG=1 + DB_NAME="netbox" + DB_USER="netbox" + DB_PASSWORD="IK$Wb5TGhphNo:-WktT" + DB_HOST="postgres.service.nr5" + DB_PORT="5472" + REDIS_HOST="redis.service.nr5" + REDIS_PORT="6379" + } + resources { + cpu = 400 + memory = 128 + } + + } + } +} \ No newline at end of file diff --git a/apps/netbox/volume.hcl b/apps/netbox/volume.hcl new file mode 100644 index 0000000..64c09ea --- /dev/null +++ b/apps/netbox/volume.hcl @@ -0,0 +1,20 @@ +type = "csi" +id = "netbox" +name = "netbox" +plugin_id = "nfs" + +capability { + access_mode = "single-node-writer" + attachment_mode = "file-system" +} + +context { + server = "ebin02.wks" + share = "/data/raid1-ssd/app-data/netbox" + mountPermissions = "0" +} + +mount_options { + fs_type = "nfs" + mount_flags = [ "timeo=30", "vers=3", "_netdev" , "nolock" ] +} \ No newline at end of file