scale-catalog/stable/immich/14.16.16/templates/_wait.tpl

19 lines
436 B
Smarty
Raw Permalink Normal View History

2024-07-13 07:59:30 +00:00
{{- define "immich.wait" -}}
{{- $url := .url }}
enabled: true
type: init
imageSelector: alpineImage
resources:
excludeExtra: true
command:
- /bin/ash
- -c
- |
echo "Pinging [{{ $url }}] until it is ready..."
until wget --spider --quiet --timeout=3 --tries 1 "{{ $url }}"; do
echo "Waiting for [{{ $url }}] to be ready..."
sleep 2
done
echo "URL [{{ $url }}] is ready!"
{{- end -}}