2024-03-22 19:20:56 +00:00
|
|
|
{{- define "immich.wait" -}}
|
|
|
|
{{- $url := .url }}
|
|
|
|
enabled: true
|
|
|
|
type: init
|
|
|
|
imageSelector: alpineImage
|
2024-03-25 01:15:13 +00:00
|
|
|
resources:
|
|
|
|
excludeExtra: true
|
2024-03-22 19:20:56 +00:00
|
|
|
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 -}}
|