Skip to content

Commit 3468dc1

Browse files
committed
build: fetch web-library submodules during image build
1 parent a342290 commit 3468dc1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Dockerfile.web-library

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,17 @@ RUN mkdir -p /app/web-library-build \
1515
&& if [ -d /app/web-library-overlay/src ]; then rsync -a /app/web-library-overlay/src/ /app/web-library-build/src/; fi \
1616
&& if [ -d /app/web-library-overlay/config ]; then rsync -a /app/web-library-overlay/config/ /app/web-library-build/config/; fi
1717

18+
# Fetch upstream submodules (the subtree does not vend them)
19+
WORKDIR /app/web-library-build
20+
RUN git clone --depth 1 https://github.com/citation-style-language/locales.git modules/locales \
21+
&& git clone --depth 1 https://github.com/zotero/reader.git modules/reader \
22+
&& git clone --depth 1 https://github.com/zotero/pdf-worker.git modules/pdf-worker \
23+
&& git clone --depth 1 https://github.com/zotero/note-editor.git modules/note-editor \
24+
&& git clone --depth 1 https://github.com/zotero/web-common.git modules/web-common \
25+
&& git clone --depth 1 https://github.com/zotero/zotero-schema.git modules/zotero-schema
26+
1827
# Build Web Library (combined subtree + overlay)
19-
RUN cd /app/web-library-build \
20-
&& npm ci \
28+
RUN npm ci \
2129
&& npm run build
2230

2331
# Runtime: serve static assets via nginx
@@ -28,4 +36,3 @@ COPY --from=builder /app/web-library-build/build/ /usr/share/nginx/html/
2836
EXPOSE 80
2937

3038
CMD ["nginx", "-g", "daemon off;"]
31-

0 commit comments

Comments
 (0)