diff --git a/kubenix-modules/all.nix b/kubenix-modules/all.nix index c76573a..eb470c4 100644 --- a/kubenix-modules/all.nix +++ b/kubenix-modules/all.nix @@ -18,7 +18,7 @@ let ./blog.nix ./attic.nix ./atuin.nix - # ./immich.nix + ./immich.nix # ./argo.nix # ./minecraft.nix ]; diff --git a/kubenix-modules/immich.nix b/kubenix-modules/immich.nix index c344197..9e30ea3 100644 --- a/kubenix-modules/immich.nix +++ b/kubenix-modules/immich.nix @@ -38,8 +38,6 @@ env = { TZ.value = "Europe/Amsterdam"; - UPLOAD_LOCATION.value = "/library"; - # IMMICH_CONFIG_FILE.value = "?"; REDIS_HOSTNAME.value = "immich-redis.default.svc.cluster.local"; DB_HOSTNAME.value = "immich-postgres.default.svc.cluster.local"; DB_USERNAME.value = "postgres"; @@ -50,7 +48,7 @@ volumeMounts = [{ name = "data"; - mountPath = "/library"; + mountPath = "/usr/src/app/upload"; }]; }; }; @@ -77,10 +75,18 @@ }; spec = { + volumes.cache.persistentVolumeClaim.claimName = "immich-cache"; + containers.machine-learning = { image = "ghcr.io/immich-app/immich-machine-learning:v1.106.4"; imagePullPolicy = "Always"; ports.ml.containerPort = 3003; + env.MACHINE_LEARNING_WORKER_TIMEOUT.value = "600"; + + volumeMounts = [{ + name = "cache"; + mountPath = "/cache"; + }]; }; }; }; @@ -154,7 +160,6 @@ spec = { volumes.data.persistentVolumeClaim.claimName = "immich-db"; - # securityContext.fsGroup = 0700; containers.postgres = { image = "docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0"; @@ -215,7 +220,7 @@ component = "machine-learning"; }; - ports.machine-learning = { + ports.ml = { port = 80; targetPort = "ml"; }; @@ -233,6 +238,11 @@ }; }; }; + + persistentVolumeClaims.immich-cache.spec = { + accessModes = [ "ReadWriteOnce" ]; + resources.requests.storage = "5Gi"; + }; }; lab.ingresses.immich-test = { diff --git a/kubenix-modules/volumes.nix b/kubenix-modules/volumes.nix index 2e073e4..8f9952f 100644 --- a/kubenix-modules/volumes.nix +++ b/kubenix-modules/volumes.nix @@ -1,4 +1,19 @@ { + # kubernetes.resources.pods.testje.spec = { + # containers.testje = { + # image = "nginx"; + + # volumeMounts = [ + + # { name = "immich"; mountPath = "/immich"; } + # { name = "immich-db"; mountPath = "/immich-db"; } + # ]; + # }; + + # volumes.immich.persistentVolumeClaim.claimName = "immich"; + # volumes.immich-db.persistentVolumeClaim.claimName = "immich-db"; + # }; + lab = { longhornVolumes = { hedgedoc-uploads.storage = "50Mi"; @@ -27,8 +42,8 @@ attic-db.storage = "150Mi"; atuin.storage = "600Mi"; atuin-db.storage = "100Mi"; - # immich.storage = "50Gi"; - # immich-db.storage = "1Gi"; + immich.storage = "50Gi"; + immich-db.storage = "5Gi"; }; nfsVolumes = {