Fix and re-enable Immich

This commit is contained in:
Pim Kunis 2024-06-20 21:35:13 +02:00
parent 884a59bfc0
commit a62d854a0e
3 changed files with 33 additions and 8 deletions

View file

@ -18,7 +18,7 @@ let
./blog.nix ./blog.nix
./attic.nix ./attic.nix
./atuin.nix ./atuin.nix
# ./immich.nix ./immich.nix
# ./argo.nix # ./argo.nix
# ./minecraft.nix # ./minecraft.nix
]; ];

View file

@ -38,8 +38,6 @@
env = { env = {
TZ.value = "Europe/Amsterdam"; TZ.value = "Europe/Amsterdam";
UPLOAD_LOCATION.value = "/library";
# IMMICH_CONFIG_FILE.value = "?";
REDIS_HOSTNAME.value = "immich-redis.default.svc.cluster.local"; REDIS_HOSTNAME.value = "immich-redis.default.svc.cluster.local";
DB_HOSTNAME.value = "immich-postgres.default.svc.cluster.local"; DB_HOSTNAME.value = "immich-postgres.default.svc.cluster.local";
DB_USERNAME.value = "postgres"; DB_USERNAME.value = "postgres";
@ -50,7 +48,7 @@
volumeMounts = [{ volumeMounts = [{
name = "data"; name = "data";
mountPath = "/library"; mountPath = "/usr/src/app/upload";
}]; }];
}; };
}; };
@ -77,10 +75,18 @@
}; };
spec = { spec = {
volumes.cache.persistentVolumeClaim.claimName = "immich-cache";
containers.machine-learning = { containers.machine-learning = {
image = "ghcr.io/immich-app/immich-machine-learning:v1.106.4"; image = "ghcr.io/immich-app/immich-machine-learning:v1.106.4";
imagePullPolicy = "Always"; imagePullPolicy = "Always";
ports.ml.containerPort = 3003; ports.ml.containerPort = 3003;
env.MACHINE_LEARNING_WORKER_TIMEOUT.value = "600";
volumeMounts = [{
name = "cache";
mountPath = "/cache";
}];
}; };
}; };
}; };
@ -154,7 +160,6 @@
spec = { spec = {
volumes.data.persistentVolumeClaim.claimName = "immich-db"; volumes.data.persistentVolumeClaim.claimName = "immich-db";
# securityContext.fsGroup = 0700;
containers.postgres = { containers.postgres = {
image = "docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0"; image = "docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0";
@ -215,7 +220,7 @@
component = "machine-learning"; component = "machine-learning";
}; };
ports.machine-learning = { ports.ml = {
port = 80; port = 80;
targetPort = "ml"; targetPort = "ml";
}; };
@ -233,6 +238,11 @@
}; };
}; };
}; };
persistentVolumeClaims.immich-cache.spec = {
accessModes = [ "ReadWriteOnce" ];
resources.requests.storage = "5Gi";
};
}; };
lab.ingresses.immich-test = { lab.ingresses.immich-test = {

View file

@ -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 = { lab = {
longhornVolumes = { longhornVolumes = {
hedgedoc-uploads.storage = "50Mi"; hedgedoc-uploads.storage = "50Mi";
@ -27,8 +42,8 @@
attic-db.storage = "150Mi"; attic-db.storage = "150Mi";
atuin.storage = "600Mi"; atuin.storage = "600Mi";
atuin-db.storage = "100Mi"; atuin-db.storage = "100Mi";
# immich.storage = "50Gi"; immich.storage = "50Gi";
# immich-db.storage = "1Gi"; immich-db.storage = "5Gi";
}; };
nfsVolumes = { nfsVolumes = {