80 lines
2.3 KiB
YAML
80 lines
2.3 KiB
YAML
kind: Deployment
|
|
apiVersion: apps/v1
|
|
metadata:
|
|
name: immich-server
|
|
namespace: immich
|
|
labels:
|
|
app: immich-server
|
|
spec:
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: immich-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: immich-server
|
|
spec:
|
|
securityContext:
|
|
fsGroup: 0
|
|
serviceAccountName: default
|
|
dnsPolicy: ClusterFirst
|
|
initContainers:
|
|
- name: postgresql-isready
|
|
image: "docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0"
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: POSTGRES_USER
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: immich-env
|
|
key: DB_USERNAME
|
|
- name: POSTGRES_DB
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: immich-env
|
|
key: DB_DATABASE_NAME
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- until pg_isready -U "${POSTGRES_USER}" -d "${POSTGRES_DB}"
|
|
-h postgres.database.svc.cluster.local -p 5432 ; do sleep 2 ; done
|
|
containers:
|
|
- name: immich-server
|
|
image: "ghcr.io/immich-app/immich-server:release"
|
|
imagePullPolicy: IfNotPresent
|
|
securityContext:
|
|
runAsUser: 0
|
|
ports:
|
|
- containerPort: 2283
|
|
envFrom:
|
|
- configMapRef:
|
|
name: immich-env
|
|
optional: false
|
|
- secretRef:
|
|
name: immich-db-secret
|
|
optional: false
|
|
livenessProbe:
|
|
failureThreshold: 120
|
|
httpGet:
|
|
path: /server/ping
|
|
port: 2283
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 120
|
|
timeoutSeconds: 1
|
|
readinessProbe:
|
|
failureThreshold: 120
|
|
httpGet:
|
|
path: /server/ping
|
|
port: 2283
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 120
|
|
timeoutSeconds: 1
|
|
volumeMounts:
|
|
- name: library
|
|
mountPath: /data
|
|
volumes:
|
|
- name: library
|
|
persistentVolumeClaim:
|
|
claimName: immich-lib |