From 8116a34609af463fd145ed8d097d5ca3eb4fc3ce Mon Sep 17 00:00:00 2001 From: bom Date: Fri, 22 Oct 2021 14:53:10 +0200 Subject: [PATCH] added livenessProbe to nextcloud-deployment --- .../docker-nextcloud/image/resources/install.sh | 2 ++ src/main/resources/nextcloud/deployment.yaml | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/infrastructure/docker-nextcloud/image/resources/install.sh b/infrastructure/docker-nextcloud/image/resources/install.sh index b92fc18..2111956 100755 --- a/infrastructure/docker-nextcloud/image/resources/install.sh +++ b/infrastructure/docker-nextcloud/image/resources/install.sh @@ -1,6 +1,8 @@ #!/bin/bash set -Eeo pipefail +apt update && apt -qqy install postgresql-client > /dev/null + mkdir /var/data install -m 0700 /tmp/install-debug.sh /usr/local/bin/ diff --git a/src/main/resources/nextcloud/deployment.yaml b/src/main/resources/nextcloud/deployment.yaml index f87b70a..b825eef 100644 --- a/src/main/resources/nextcloud/deployment.yaml +++ b/src/main/resources/nextcloud/deployment.yaml @@ -22,6 +22,14 @@ spec: imagePullPolicy: IfNotPresent ports: - containerPort: 80 + livenessProbe: + exec: + command: + - /bin/sh + - -c + - PGPASSWORD=$POSTGRES_PASSWORD psql -h postgresql-service -U $POSTGRES_USER $POSTGRES_DB + initialDelaySeconds: 1 + periodSeconds: 5 env: - name: NEXTCLOUD_ADMIN_USER valueFrom: