use statefulSets and readinessProbes instead of initContainers
This commit is contained in:
@@ -16,48 +16,37 @@ spec:
|
||||
labels:
|
||||
app: immich-app
|
||||
spec:
|
||||
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:v2.3.1
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
pg_isready -h immich-psql.media.svc.cluster.local -U postgres -p 5432
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
failureThreshold: 5
|
||||
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
|
||||
value: "immich-redis.media.svc.cluster.local"
|
||||
- name: DB_USERNAME
|
||||
value: "postgres"
|
||||
- name: DB_DATABASE_NAME
|
||||
value: "immich"
|
||||
- name: DB_HOSTNAME
|
||||
value: "immich-psql-service"
|
||||
value: "immich-psql.media.svc.cluster.local"
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: immich-postgres-secret
|
||||
key: password
|
||||
volumeMounts:
|
||||
- mountPath: /usr/src/app/upload
|
||||
name: pictures
|
||||
|
||||
Reference in New Issue
Block a user