Skip to content

Commit bdb746e

Browse files
committed
Ass support for xapian indexer.
whoosh was built into the docker, but provides a fuzzy search with 1 edit. So adding xapinan to have a higher priority search that is not fuzzy.
1 parent 6620127 commit bdb746e

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

scripts/Docker/Dockerfile

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,31 @@ RUN apk add \
3232
g++ \
3333
gcc \
3434
gpgme-dev \
35+
libxapian \
3536
linux-headers \
37+
make \
3638
musl-dev \
3739
mysql-dev \
3840
postgresql-dev \
39-
swig
41+
swig \
42+
xapian-core-dev
43+
44+
# build xapian bindings:
45+
# file with sphinx build dependencies to remove after build
46+
# they are over 70MB of space.
47+
COPY scripts/Docker/sphinxdeps.txt .
48+
49+
RUN set -xv && CWD=$PWD && \
50+
VER=$(apk list -I 'xapian-core-dev' | \
51+
sed 's/^xapian-core-dev-\([0-9.]*\)-.*/\1/') && \
52+
cd /tmp && \
53+
wget https://oligarchy.co.uk/xapian/$VER/xapian-bindings-$VER.tar.xz && \
54+
tar -Jxvf xapian-bindings-$VER.tar.xz && \
55+
cd xapian-bindings-$VER/ && \
56+
pip --no-cache-dir install sphinx==1.8.5 && \
57+
./configure --prefix=/usr/local --with-python3 --disable-documentation && \
58+
make && make install && \
59+
pip uninstall --no-cache-dir -y -r $CWD/sphinxdeps.txt
4060

4161
# add requirements for pip here, e.g. Whoosh, gpg, zstd or other
4262
# modules not installed in the base library.
@@ -83,7 +103,8 @@ RUN apk add \
83103
gpgme \
84104
mariadb-connector-c \
85105
libpq \
86-
libstdc++
106+
libstdc++ \
107+
libxapian
87108

88109
ARG source
89110
LABEL "org.roundup-tracker.vendor"="Roundup Issue Tracker Team" \

0 commit comments

Comments
 (0)