Compare commits

...

9 Commits

Author SHA1 Message Date
71ada23bf7 Add meta tags. 2024-01-19 07:45:06 +00:00
e20a85c1ba (partial) oauth setup 2024-01-18 17:58:28 +00:00
0c1722731a Update 2024-01-18 17:58:23 +00:00
33c8b91ef7 Run netbox workers. 2024-01-18 16:16:48 +00:00
f7b6d63313 More RAM 2024-01-18 16:13:38 +00:00
4516f3c5c3 More RAM 2024-01-18 16:13:29 +00:00
4b24066e85 farmOS 3.0.0 2024-01-17 18:18:20 +00:00
b35cf31dbe Initial netbox config. 2024-01-17 16:45:52 +00:00
c9c5168dd7 Run opensprinkler-weather proxy. 2024-01-17 07:13:04 +00:00
6 changed files with 159 additions and 5 deletions

View File

@@ -114,5 +114,5 @@ variable "secret_key" {
variable "authentik_version" {
type = string
default = "2023.10.4"
default = "2023.10.6"
}

View File

@@ -12,7 +12,7 @@ job "farmos" {
driver = "docker"
config {
image = "farmos/farmos:3.0.0-beta3"
image = "farmos/farmos:3.0.0"
ports = ["http"]
volumes = [
"/data/compute/appdata/farmos/sites:/opt/drupal/web/sites",

View File

@@ -1,6 +1,10 @@
job "gitea" {
datacenters = ["alo"]
meta {
uuid = uuidv4()
}
group "web" {
network {
port "http" {

127
services/netbox.hcl Normal file
View File

@@ -0,0 +1,127 @@
job "netbox" {
datacenters = ["alo"]
group "server" {
network {
port "http" {
to = 8080
}
}
task "frontend" {
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"
REMOTE_AUTH_ENABLED = "true"
REMOTE_AUTH_BACKEND = "social_core.backends.open_id_connect.OpenIdConnectAuth"
SOCIAL_AUTH_OIDC_ENDPOINT = "https://authentik.v.paler.net/application/o/netbox/"
SOCIAL_AUTH_OIDC_KEY = "XiPhZmWy2mp8hQyHLXCwk7njRNPSLTp2vSHhvWYI"
SOCIAL_AUTH_OIDC_SECRET = "Kkop2dStx0gN52V1LfPnoxcaemuur6zMsvRnqpWSDe2qSngJVcqWfvFXaNeTbdURRB6TPwjlaNJ5BXR2ChcSmokWGTGargu84Ox1D6M2zXTsfLFj9B149Mhblos4mJL1"
LOGOUT_REDIRECT_URL = "https://authentik.v.paler.net/application/o/netbox/end-session/"
}
resources {
memory = 512
}
service {
name = "netbox"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.netbox.entryPoints=websecure",
]
}
}
task "worker" {
driver = "docker"
config {
image = "docker.io/netboxcommunity/netbox:v3.7-2.8.0"
command = "/opt/netbox/venv/bin/python"
args = [
"/opt/netbox/netbox/manage.py",
"rqworker",
]
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"
}
}
task "housekeeping" {
driver = "docker"
config {
image = "docker.io/netboxcommunity/netbox:v3.7-2.8.0"
command = "/opt/netbox/housekeeping.sh"
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"
}
}
}
}

View File

@@ -1,6 +1,11 @@
job "postgres" {
datacenters = ["alo"]
meta {
uuid = uuidv4()
}
group "db" {
network {
port "db" {
@@ -38,7 +43,7 @@ job "postgres" {
resources {
cpu = 1000
memory = 512
memory = 1024
}
}

View File

@@ -9,6 +9,10 @@ job "weewx" {
network {
port "http" {
}
port "osweather" {
static = 20080
to = 80
}
}
task "backend" {
@@ -23,8 +27,7 @@ job "weewx" {
}
resources {
# needed for running weectl report run inside the container
#memory = 1024
memory = 1024
}
}
@@ -45,6 +48,16 @@ job "weewx" {
}
}
task "osweather" {
driver = "docker"
config {
image = "gitea.v.paler.net/ppetru/opensprinkler-weather:latest"
ports = [ "osweather" ]
}
}
service {
name = "weather"
port = "http"
@@ -62,5 +75,10 @@ job "weewx" {
timeout = "2s"
}
}
service {
name = "osweather"
port = "osweather"
}
}
}