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
./attic.nix
./atuin.nix
# ./immich.nix
./immich.nix
# ./argo.nix
# ./minecraft.nix
];

View file

@ -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 = {

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 = {
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 = {