Skip to content

Commit 6323d87

Browse files
genofireMüller, Martin
authored and
Müller, Martin
committed
fix(docker-entrypoint): startup with new search index for all existing trees
1 parent a632c22 commit 6323d87

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docker-entrypoint.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@ then
1414
fi
1515

1616
# Create search index if not exists
17-
if [ ! -f /app/indexdir/search_index.db ] && [ "${GRAMPSWEB_TREE}" != "*" ];
18-
then
19-
python3 -m gramps_webapi --config /app/config/config.cfg search index-full
17+
if [ ! -f /app/indexdir/search_index.db ]; then
18+
if [ "${GRAMPSWEB_TREE}" = "*" ]; then
19+
for GRAMPSWEB_TREE in $(python3 -m gramps_webapi --config /app/config/config.cfg tree list | awk '{print $1;}' | grep -v Tree); do
20+
python3 -m gramps_webapi --config /app/config/config.cfg search index-full;
21+
done
22+
else
23+
python3 -m gramps_webapi --config /app/config/config.cfg search index-full;
24+
fi
2025
fi
2126

2227
# Run migrations for user database, if any

0 commit comments

Comments
 (0)