about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2026-04-09 11:05:20 +0900
committerRobert Günzler <r@gnzler.io>2026-04-22 14:36:52 +0900
commitdd91fd46a22b7666a4155874de1998c896a619d3 (patch)
tree3a79f6016b25b779b525027116270d868bd025e3
parentf87c066685098da9a67dd410104cbba8c5fdcdbd (diff)
deploy gonic
Signed-off-by: Robert Günzler <r@gnzler.io>
-rw-r--r--bundles/gonic/files/kube.yaml67
-rw-r--r--bundles/gonic/items.py7
-rw-r--r--bundles/gonic/metadata.py16
-rw-r--r--nodes.py1
4 files changed, 91 insertions, 0 deletions
diff --git a/bundles/gonic/files/kube.yaml b/bundles/gonic/files/kube.yaml
new file mode 100644
index 0000000..1eaeb5b
--- /dev/null
+++ b/bundles/gonic/files/kube.yaml
@@ -0,0 +1,67 @@
+apiVersion: v1
+kind: Pod
+metadata:
+  name: gonic
+  labels:
+    traefik.enable: true
+    traefik.http.routers.gonic.tls: true
+    traefik.http.routers.gonic.tls.certresolver: le
+    traefik.http.routers.gonic.entrypoints: http,https
+    traefik.http.routers.gonic.rule: Host(`music.gzr.im`)
+    traefik.http.routers.gonic.service: gonic
+    traefik.http.services.gonic.loadbalancer.server.port: 80
+spec:
+  dnsPolicy: Default
+  containers:
+    - name: gonic
+      image: docker.io/sentriz/gonic:${version}
+      env:
+        - name: GONIC_EXCLUDE_PATTERN
+          value: '.*\/inbox\/.*'
+        - name: GONIC_SCAN_INTERVAL
+          value: 1440
+        - name: GONIC_SCAN_AT_START_ENABLED
+          value: 1
+      volumeMounts:
+        - name: data
+          mountPath: /data
+        - name: cache
+          mountPath: /cache
+        - name: podcasts
+          mountPath: /podcasts
+        - name: playlists
+          mountPath: /playlists
+        - name: media
+          mountPath: /music
+          readOnly: true
+      ports:
+        - containerPort: 80
+          protocol: TCP
+      #livenessProbe:
+      #  exec:
+      #    command: ["/healthcheck.sh"]
+      #resources:
+      #  limits:
+      #    cpu: 100m
+      #    memory: 128Mi
+  volumes:
+    - name: data
+      hostPath:
+        path: /var/lib/gonic/data
+        type: DirectoryOrCreate
+    - name: cache
+      hostPath:
+        path: /var/lib/gonic/cache
+        type: DirectoryOrCreate
+    - name: podcasts
+      hostPath:
+        path: /var/lib/gonic/podcasts
+        type: DirectoryOrCreate
+    - name: playlists
+      hostPath:
+        path: /var/lib/gonic/playlists
+        type: DirectoryOrCreate
+    - name: media
+      hostPath:
+        path: /media/hayasui/media/music
+        type: Directory
diff --git a/bundles/gonic/items.py b/bundles/gonic/items.py
new file mode 100644
index 0000000..f5d943f
--- /dev/null
+++ b/bundles/gonic/items.py
@@ -0,0 +1,7 @@
+files = {
+    "/etc/deployments/gonic/kube.yaml": {
+        "content_type": "mako",
+        "context": node.metadata.get("containers")["gonic"],
+        "triggers": {"svc_s6rc:gonic:restart"},
+    },
+}
diff --git a/bundles/gonic/metadata.py b/bundles/gonic/metadata.py
new file mode 100644
index 0000000..67b033d
--- /dev/null
+++ b/bundles/gonic/metadata.py
@@ -0,0 +1,16 @@
+defaults = {
+    "containers": {
+        "gonic": {
+            "version": "latest",
+        },
+    },
+    # "backup": {
+    #     "/var/lib/gonic": {},
+    # },
+    # "metrics": {
+    #     "gonic": {},
+    # },
+    # "go": {
+    #     "gonic": "https://gonic.gzr.im",
+    # },
+}
diff --git a/nodes.py b/nodes.py
index c98e687..01b5af4 100644
--- a/nodes.py
+++ b/nodes.py
@@ -65,6 +65,7 @@ nodes = {
             "nfs",
             "bitfroest",
             "calibre",
+            "gonic",
             # "papra",
             # "hass",
         },