Initial netbox config.

This commit is contained in:
2024-01-17 16:45:52 +00:00
parent c9c5168dd7
commit b35cf31dbe

55
services/netbox.hcl Normal file
View File

@@ -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",
]
}
}
}
}