Files
public-k3s/cluster/apps/immich/immich.yml

91 lines
2.3 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: immich-app
namespace: default
spec:
strategy:
type: Recreate
replicas: 1
selector:
matchLabels:
app: immich-app
template:
metadata:
labels:
app: immich-app
spec:
runtimeClassName: nvidia
initContainers:
- name: wait-for-redis
image: busybox
command:
- sh
- -c
- |
until nc -z -v -w30 immich-redis-service 6379; do
echo "Waiting for redis database to be ready..."
sleep 2
done
- name: wait-for-psql
image: busybox
command:
- sh
- -c
- |
until nc -z -v -w30 immich-psql-service 5432; do
echo "Waiting for psql database to be ready"
sleep 2
done
containers:
- name: immich-server
image: ghcr.io/immich-app/immich-server:v1.138.0
ports:
- containerPort: 2283
env:
- name: TZ
value: "Asia/Kolkata"
- name: REDIS_HOSTNAME
value: "immich-redis-service"
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: immich-postgres-secret
key: password
- name: DB_USERNAME
value: "postgres"
- name: DB_DATABASE_NAME
value: "immich"
- name: DB_HOSTNAME
value: "immich-psql-service"
volumeMounts:
- mountPath: /usr/src/app/upload
name: pictures
- name: immich-machine-learning
image: ghcr.io/immich-app/immich-machine-learning:v1.138.0-cuda
ports:
- containerPort: 3003
env:
- name: REDIS_HOSTNAME
value: "immich-redis-service"
- name: NVIDIA_VISIBLE_DEVICES
value: "all"
- name: MACHINE_LEARNING_DEVICE_IDS
value: "0"
volumeMounts:
- name: model-cache
mountPath: /cache
resources:
requests:
nvidia.com/gpu: 1
limits:
nvidia.com/gpu: 1
volumes:
- name: pictures
persistentVolumeClaim:
claimName: immich-pictures-pvc
- name: model-cache
persistentVolumeClaim:
claimName: immich-cache-ceph