poststartup script moved to extra container, non init
This commit is contained in:
parent
1be00f2726
commit
d7667e7c11
@ -193,7 +193,6 @@ extraContainers:
|
|||||||
for idx in "chat:$TEMPLATE_PATH_1" "message:$TEMPLATE_PATH_2" "user:$TEMPLATE_PATH_3"; do
|
for idx in "chat:$TEMPLATE_PATH_1" "message:$TEMPLATE_PATH_2" "user:$TEMPLATE_PATH_3"; do
|
||||||
name="${idx%%:*}"
|
name="${idx%%:*}"
|
||||||
path="${idx##*:}"
|
path="${idx##*:}"
|
||||||
# Check if index exists
|
|
||||||
if curl -sf -o /dev/null "$ES_URL/$name"; then
|
if curl -sf -o /dev/null "$ES_URL/$name"; then
|
||||||
echo "[template-loader] Index $name already exists. Skipping."
|
echo "[template-loader] Index $name already exists. Skipping."
|
||||||
else
|
else
|
||||||
@ -203,8 +202,8 @@ extraContainers:
|
|||||||
--data-binary @"$path"
|
--data-binary @"$path"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "[template-loader] All templates applied (or skipped). Exiting."
|
echo "[template-loader] All templates applied (or skipped). Going to sleep to prevent container exit."
|
||||||
|
sleep infinity
|
||||||
env:
|
env:
|
||||||
- name: ES_URL
|
- name: ES_URL
|
||||||
value: "http://elasticsearch-master:9200"
|
value: "http://elasticsearch-master:9200"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user