diff --git a/services/netbox.hcl b/services/netbox.hcl new file mode 100644 index 0000000..e118756 --- /dev/null +++ b/services/netbox.hcl @@ -0,0 +1,55 @@ +job "netbox" { + datacenters = ["alo"] + + group "server" { + network { + port "http" { + to = 8080 + } + } + + task "backend" { + driver = "docker" + + config { + image = "docker.io/netboxcommunity/netbox:v3.7-2.8.0" + ports = ["http"] + volumes = [ + "/data/compute/appdata/netbox/configuration:/etc/netbox/config:z,ro", + "/data/compute/appdata/netbox/media:/opt/netbox/media", + "/data/compute/appdata/netbox/reports:/opt/netbox/reports", + "/data/compute/appdata/netbox/files:/opt/netbox/scripts", + ] + } + + env { + DB_HOST = "postgres.service.consul" + DB_NAME = "netbox" + DB_USER = "netbox" + DB_PASSWORD = "ik1chah5ae9Un7oozeiX" + EMAIL_FROM = "netbox@paler.net" + EMAIL_SERVER = "192.168.1.1" + GRAPHQL_ENABLED = "true" + HOUSEKEEPING_INTERVAL = "86400" + MEDIA_ROOT = "/opt/netbox/netbox/media" + REDIS_CACHE_HOST = "redis.service.consul" + REDIS_HOST = "redis.service.consul" + SECRET_KEY = "&EqXd#NTzIb2d2mvYxcOv5)&78fH5*Gq1&mstMGUaIyBfp-z+9" + } + + resources { + memory = 512 + } + + service { + name = "netbox" + port = "http" + + tags = [ + "traefik.enable=true", + "traefik.http.routers.netbox.entryPoints=websecure", + ] + } + } + } +}