2024-03-16 16:09:37 +00:00
|
|
|
{{- define "nextcloud.wait.nextcloud" -}}
|
|
|
|
{{- $fullname := (include "tc.v1.common.lib.chart.names.fullname" $) -}}
|
|
|
|
{{- $ncURL := printf "%v-nextcloud:%v" $fullname .Values.service.nextcloud.ports.nextcloud.targetPort }}
|
|
|
|
enabled: true
|
|
|
|
type: init
|
|
|
|
imageSelector: image
|
2024-03-23 08:18:18 +00:00
|
|
|
resources:
|
|
|
|
excludeExtra: true
|
2024-03-16 16:09:37 +00:00
|
|
|
securityContext:
|
|
|
|
command: /bin/sh
|
|
|
|
args:
|
|
|
|
- -c
|
|
|
|
- |
|
|
|
|
echo "Waiting Nextcloud [{{ $ncURL }}] to be ready and installed..."
|
|
|
|
until \
|
|
|
|
REQUEST_METHOD="GET" \
|
|
|
|
SCRIPT_NAME="status.php" \
|
|
|
|
SCRIPT_FILENAME="status.php" \
|
|
|
|
cgi-fcgi -bind -connect "{{ $ncURL }}" | grep -q '"installed":true';
|
|
|
|
do
|
|
|
|
echo "Waiting Nextcloud [{{ $ncURL }}] to be ready and installed..."
|
|
|
|
sleep 3
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "Nextcloud is ready and installed..."
|
|
|
|
echo "Starting Nginx..."
|
|
|
|
{{- end -}}
|