poststartup script moved to extra container, non init

This commit is contained in:
Leo Sok 2025-07-24 13:25:40 +03:00
parent ffc784d4cd
commit 30cf1c8fe3

View File

@ -189,12 +189,12 @@ extraContainers:
echo "[template-loader] Attempt $i: ES not ready, sleeping..."
sleep "${RETRY_INTERVAL:-5}"
done
echo "[template-loader] Applying templates..."
echo "[template-loader] Applying index templates..."
for idx in "chat:$TEMPLATE_PATH_1" "message:$TEMPLATE_PATH_2" "user:$TEMPLATE_PATH_3"; do
name="${idx%%:*}"
path="${idx##*:}"
echo "[template-loader] Applying $name from $path..."
curl -X PUT "$ES_URL/$name" \
echo "[template-loader] Applying template: $name from $path..."
curl -X PUT "$ES_URL/_index_template/$name" \
-H 'Content-Type: application/json' \
--data-binary @"$path"
done